Commit 8485f64c authored by Christian Stenger's avatar Christian Stenger

Squish: Fix verification of compile output

Change-Id: I1c55e826a79fa0f36d2870cfcb08a325ba6408e1
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent a9f163a4
......@@ -80,15 +80,18 @@ def checkCompile():
ensureChecked(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
waitFor("len(str(output.plainText))>0",5000)
success = str(output.plainText).endswith("exited normally.")
if success:
if compileSucceeded(output.plainText):
if os.getenv("SYSTEST_DEBUG") == "1":
test.log("Compile Output:\n%s" % output.plainText)
else:
test.passes("Compile successful")
test.passes("Compile successful")
return True
else:
test.fail("Compile Output:\n%s" % output.plainText)
return success
return False
def compileSucceeded(compileOutput):
return None != re.match(".*exited normally\.\n\d\d:\d\d:\d\d: Elapsed time: "
"(\d:)?\d{2}:\d\d\.$", str(compileOutput), re.S)
# helper method that parses the Issues output and writes a tasks file
def createTasksFile(list):
......
......@@ -27,7 +27,7 @@ def main():
# verify build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
if not test.verify(str(compileOutput.plainText).endswith("exited normally."),
if not test.verify(compileSucceeded(compileOutput.plainText),
"Verifying building of existing complex qt application."):
test.log(compileOutput.plainText)
# exit
......
......@@ -19,7 +19,7 @@ def main():
# check output if build successful
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
if not test.verify(str(compileOutput.plainText).endswith("exited normally."),
if not test.verify(compileSucceeded(compileOutput.plainText),
"Verifying building of simple qt quick application."):
test.log(compileOutput.plainText)
# exit qt creator
......
......@@ -44,7 +44,7 @@ def main():
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
outputLog = str(waitForObject(":Qt Creator.Compile Output_Core::OutputWindow").plainText)
# verify that project was built successfully
test.verify(outputLog.endswith("exited normally."),
test.verify(compileSucceeded(outputLog),
"Verifying building of simple qt quick application while multiple projects are open.")
# verify that proper project (project 2) was build
test.verify(projectName2 in outputLog and projectName1 not in outputLog,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment