From 70a2412a71f31508cb330452676c2f8f7eef57c9 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Wed, 26 Dec 2018 12:23:26 -0800 Subject: [PATCH] Windows version now deletes entities before starting tests. --- tools/nitpick/src/TestRunner.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tools/nitpick/src/TestRunner.cpp b/tools/nitpick/src/TestRunner.cpp index 9b99e114a7..bbdd36a12a 100644 --- a/tools/nitpick/src/TestRunner.cpp +++ b/tools/nitpick/src/TestRunner.cpp @@ -469,12 +469,30 @@ void TestRunner::runInterfaceWithTestScript() { url = "hifi://localhost"; } + QString deleteScript = + QString("https://raw.githubusercontent.com/") + _user + "/hifi_tests/" + _branch + "/tests/utils/deleteNearbyEntities.js"; + QString testScript = QString("https://raw.githubusercontent.com/") + _user + "/hifi_tests/" + _branch + "/tests/testRecursive.js"; QString commandLine; #ifdef Q_OS_WIN - QString exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; + QString exeFile; + // First, run script to delete any entities in test area + // Note that this will run to completion before continuing + exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; + commandLine = "start /wait \"\" " + exeFile + + " --url " + url + + " --no-updater" + + " --no-login-suggestion" + " --testScript " + deleteScript + " quitWhenFinished" + + " --testResultsLocation " + _snapshotFolder; + + + system(commandLine.toStdString().c_str()); + + // Now run the test suite + exeFile = QString("\"") + QDir::toNativeSeparators(_installationFolder) + "\\interface.exe\""; commandLine = exeFile + " --url " + url + " --no-updater" +