diff options
author | Christian Stenger <christian.stenger@digia.com> | 2014-01-24 10:57:56 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@digia.com> | 2014-01-24 15:39:34 +0100 |
commit | cc28865b53e4264046ee0ce916f3705cb1c691f0 (patch) | |
tree | 31fdb2049ba5a552c4ef2dc9f8b083a33c8bce15 | |
parent | fd75b0888a1741e8a7d38621bc518ded95c94e31 (diff) | |
download | qt-creator-cc28865b53e4264046ee0ce916f3705cb1c691f0.tar.gz |
Squish: Fix hook-into issue on Windows
Change-Id: I45ec21c6a7a0c5e34e72226fbb442f0ab681fa4d
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
-rw-r--r-- | tests/system/shared/project.py | 3 | ||||
-rw-r--r-- | tests/system/shared/qtcreator.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 379548a121..66fc685413 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -518,6 +518,9 @@ def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefT __closeSubprocessByPushingStop__(sType) except: pass + if (platform.system() in ('Microsoft', 'Windows') and + 'Listening on port %d for incoming connectionsdone' % port not in str(output.plainText)): + checkForStillRunningQmlExecutable([executable + ".exe"]) return True # this helper tries to reset the current application context back diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 290d622ce7..086aa9411e 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -95,7 +95,7 @@ def waitForCleanShutdown(timeOut=10): shutdownDone = (str(appCtxt)=="") if platform.system() in ('Windows','Microsoft'): # cleaning helper for running on the build machines - __checkForQmlViewerAndQmlScene__() + checkForStillRunningQmlExecutable(['qmlviewer.exe', 'qmlscene.exe']) endtime = datetime.utcnow() + timedelta(seconds=timeOut) while not shutdownDone: # following work-around because os.kill() works for win not until python 2.7 @@ -120,8 +120,8 @@ def waitForCleanShutdown(timeOut=10): if not shutdownDone and datetime.utcnow() > endtime: break -def __checkForQmlViewerAndQmlScene__(): - for qmlHelper in ['qmlviewer.exe', 'qmlscene.exe']: +def checkForStillRunningQmlExecutable(possibleNames): + for qmlHelper in possibleNames: tasks = subprocess.Popen("tasklist /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True, stdout=subprocess.PIPE) output = tasks.communicate()[0] |