Skip to content
Snippets Groups Projects
Commit 97207cf2 authored by Robert Loehning's avatar Robert Loehning Committed by Robert Löhning
Browse files

Squish: Improved function checkCompile()

Change-Id: Ib1b0dada442dc58f1e56343cf4ae602650291fcf
Reviewed-on: http://codereview.qt-project.org/6167


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
parent 433534ad
No related branches found
No related tags found
No related merge requests found
...@@ -91,10 +91,12 @@ def checkCompile(): ...@@ -91,10 +91,12 @@ def checkCompile():
output = waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1' windowTitle='Compile Output'" output = waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1' windowTitle='Compile Output'"
" window=':Qt Creator_Core::Internal::MainWindow'}", 20000) " window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
waitFor("len(str(output.plainText))>0",5000) 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) test.log("Compile Output:\n%s" % output.plainText)
else: 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 # helper method that parses the Issues output and writes a tasks file
def createTasksFile(list): def createTasksFile(list):
......
...@@ -13,11 +13,13 @@ def main(): ...@@ -13,11 +13,13 @@ def main():
test.log("Building project") test.log("Building project")
invokeMenuItem("Build","Build All") invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000) waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
checkCompile() if not checkCompile():
checkLastBuild() test.fatal("Compile failed")
test.log("Running project (includes build)") else:
if runAndCloseApp(): checkLastBuild()
logApplicationOutput() test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
def createNewQtQuickApplication(): def createNewQtQuickApplication():
......
...@@ -18,11 +18,13 @@ def main(): ...@@ -18,11 +18,13 @@ def main():
test.log("Building project") test.log("Building project")
invokeMenuItem("Build","Build All") invokeMenuItem("Build","Build All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000) waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
checkCompile() if not checkCompile():
checkLastBuild() test.fatal("Compile failed")
test.log("Running project (includes build)") else:
if runAndCloseApp(): checkLastBuild()
logApplicationOutput() test.log("Running project (includes build)")
if runAndCloseApp():
logApplicationOutput()
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
def prepareTemplate(sourceExample): def prepareTemplate(sourceExample):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment