forked from qt-creator/qt-creator
Squish: Fix hook-into issue on Windows
Change-Id: I45ec21c6a7a0c5e34e72226fbb442f0ab681fa4d Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -518,6 +518,9 @@ def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefT
|
|||||||
__closeSubprocessByPushingStop__(sType)
|
__closeSubprocessByPushingStop__(sType)
|
||||||
except:
|
except:
|
||||||
pass
|
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
|
return True
|
||||||
|
|
||||||
# this helper tries to reset the current application context back
|
# this helper tries to reset the current application context back
|
||||||
|
@@ -95,7 +95,7 @@ def waitForCleanShutdown(timeOut=10):
|
|||||||
shutdownDone = (str(appCtxt)=="")
|
shutdownDone = (str(appCtxt)=="")
|
||||||
if platform.system() in ('Windows','Microsoft'):
|
if platform.system() in ('Windows','Microsoft'):
|
||||||
# cleaning helper for running on the build machines
|
# cleaning helper for running on the build machines
|
||||||
__checkForQmlViewerAndQmlScene__()
|
checkForStillRunningQmlExecutable(['qmlviewer.exe', 'qmlscene.exe'])
|
||||||
endtime = datetime.utcnow() + timedelta(seconds=timeOut)
|
endtime = datetime.utcnow() + timedelta(seconds=timeOut)
|
||||||
while not shutdownDone:
|
while not shutdownDone:
|
||||||
# following work-around because os.kill() works for win not until python 2.7
|
# 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:
|
if not shutdownDone and datetime.utcnow() > endtime:
|
||||||
break
|
break
|
||||||
|
|
||||||
def __checkForQmlViewerAndQmlScene__():
|
def checkForStillRunningQmlExecutable(possibleNames):
|
||||||
for qmlHelper in ['qmlviewer.exe', 'qmlscene.exe']:
|
for qmlHelper in possibleNames:
|
||||||
tasks = subprocess.Popen("tasklist /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True,
|
tasks = subprocess.Popen("tasklist /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = tasks.communicate()[0]
|
output = tasks.communicate()[0]
|
||||||
|
Reference in New Issue
Block a user