Commit 6f6dbe23 authored by Robert Loehning's avatar Robert Loehning

Squish: Optimization in checkLastBuild()

Change-Id: Id706efcf25e39d55a80ebfcd2ed0212c7f1a2324
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 4cafb66b
......@@ -43,8 +43,9 @@ def checkLastBuild(expectedToFail=False, createTasksFileOnError=True):
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")
model = waitForObject(":Qt Creator.Issues_QListView").model()
buildIssues = dumpBuildIssues(model)
errors = len(filter(lambda i: i[5] == "1", buildIssues))
warnings = len(filter(lambda i: i[5] == "2", buildIssues))
types = map(lambda i: i[5], buildIssues)
errors = types.count("1")
warnings = types.count("2")
gotErrors = errors != 0
if not (gotErrors ^ expectedToFail):
test.passes("Errors: %s | Warnings: %s" % (errors, warnings))
......
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