Squish: Improved function checkCompile()

Change-Id: Ib1b0dada442dc58f1e56343cf4ae602650291fcf
Reviewed-on: http://codereview.qt-project.org/6167
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
Robert Loehning
2011-10-06 16:46:03 +02:00
committed by Robert Löhning
parent 433534adb2
commit 97207cf28c
3 changed files with 18 additions and 12 deletions

View File

@@ -91,10 +91,12 @@ def checkCompile():
output = waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1' windowTitle='Compile Output'"
" window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
waitFor("len(str(output.plainText))>0",5000)
if str(output.plainText).lower().find("error")==-1:
success = str(output.plainText).lower().find("error")==-1
if success:
test.log("Compile Output:\n%s" % output.plainText)
else:
test.fatal("Compile Output:\n%s" % output.plainText)
test.fail("Compile Output:\n%s" % output.plainText)
return success
# helper method that parses the Issues output and writes a tasks file
def createTasksFile(list):

View File

@@ -13,11 +13,13 @@ def main():
test.log("Building project")
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
checkCompile()
checkLastBuild()
test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
invokeMenuItem("File", "Exit")
def createNewQtQuickApplication():

View File

@@ -18,11 +18,13 @@ def main():
test.log("Building project")
invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
checkCompile()
checkLastBuild()
test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
if not checkCompile():
test.fatal("Compile failed")
else:
checkLastBuild()
test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
invokeMenuItem("File", "Exit")
def prepareTemplate(sourceExample):