forked from qt-creator/qt-creator
Cleanup to use new waitForSignal function.
Change-Id: Id47c81fc3c2d4448f26dd2432b73286501be1e26 Reviewed-on: http://codereview.qt-project.org/5297 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
committed by
Christian Stenger
parent
226a11db6f
commit
106473c4b5
@@ -2,10 +2,6 @@
|
||||
installedSignalHandlers = {}
|
||||
# flag to indicate whether overrideInstallLazySignalHandler() has been called already
|
||||
overridenInstallLazySignalHandlers = False
|
||||
# flag to indicate a finished build (has to be resetted before doing another build)
|
||||
buildFinished = False
|
||||
# flag to indicate a successful build
|
||||
buildSucceeded = False
|
||||
# flag to indicate whether a tasks file should be created when building ends with errors
|
||||
createTasksFileOnError = True
|
||||
# currently used directory for tasks files
|
||||
@@ -88,18 +84,6 @@ def checkLastBuild(expectedToFail=False):
|
||||
createTasksFile(list)
|
||||
return not gotErrors
|
||||
|
||||
# helper function used as handler for signal buildQueueFinished(bool) - see below
|
||||
def handleBuildFinished(object, success):
|
||||
global buildFinished, buildSucceeded
|
||||
buildFinished = True
|
||||
if success:
|
||||
buildSucceeded = checkLastBuild()
|
||||
else:
|
||||
test.fatal("Build failed")
|
||||
buildSucceeded = success
|
||||
checkCompile()
|
||||
checkLastBuild()
|
||||
|
||||
# helper function to check the compilation when build wasn't successful
|
||||
def checkCompile():
|
||||
toggleCompOutput = waitForObject("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
|
||||
@@ -114,13 +98,6 @@ def checkCompile():
|
||||
else:
|
||||
test.fatal("Compile Output:\n%s" % output.plainText)
|
||||
|
||||
# after starting to build an application this function can be used to synchronize the following tests
|
||||
# make sure to set global variable buildFinished to False before starting to build
|
||||
def waitForBuildFinished(timeOutMSeconds=30000):
|
||||
overrideInstallLazySignalHandler()
|
||||
installLazySignalHandler("{type='ProjectExplorer::BuildManager'}", "buildQueueFinished(bool)", "handleBuildFinished")
|
||||
waitFor("buildFinished == True", timeOutMSeconds)
|
||||
|
||||
# helper method that parses the Build Issues output and writes a tasks file
|
||||
def createTasksFile(list):
|
||||
global tasksFileDir, tasksFileCount
|
||||
|
||||
Reference in New Issue
Block a user