From 8aea237ad755ebee312e80d06505769019fd5bd6 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Thu, 8 Nov 2018 14:26:27 -0800 Subject: [PATCH] Fixed endless wait --- tools/auto-tester/src/TestRunner.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/auto-tester/src/TestRunner.cpp b/tools/auto-tester/src/TestRunner.cpp index b947f2544a..740b3f4087 100644 --- a/tools/auto-tester/src/TestRunner.cpp +++ b/tools/auto-tester/src/TestRunner.cpp @@ -118,7 +118,7 @@ void TestRunner::setWorkingFolder() { script.write("#!/bin/sh\n\n"); script.write("PROCESS=\"$1\"\n"); - script.write("until (pgrep $PROCESS >nul)\n"); + script.write("until (pgrep -x $PROCESS >nul)\n"); script.write("do\n"); script.write("\techo waiting for \"$1\" to start\n"); script.write("\tsleep 2\n"); @@ -137,7 +137,7 @@ void TestRunner::setWorkingFolder() { script.write("#!/bin/sh\n\n"); script.write("PROCESS=\"$1\"\n"); - script.write("while (pgrep $PROCESS >nul)\n"); + script.write("while (pgrep -x $PROCESS >nul)\n"); script.write("do\n"); script.write("\techo waiting for \"$1\" to finish\n"); script.write("\tsleep 2\n"); @@ -515,7 +515,6 @@ void TestRunner::runInterfaceWithTestScript() { " --no-login-suggestion" " --testScript " + testScript + " quitWhenFinished" + " --testResultsLocation " + _snapshotFolder + - " && " + _workingFolder +"/waitForStart.sh interface" + " && " + _workingFolder +"/waitForFinish.sh interface"; script.write(commandLine.toStdString().c_str());