aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@digia.com>2014-05-21 20:01:13 +0200
committerRobert Loehning <robert.loehning@digia.com>2014-05-22 12:00:11 +0200
commit6f6dbe23b8d5dd31d5bc7a28058c48a789129160 (patch)
treeb904a4a5084d9775edc4e563d95073f949459317
parent4cafb66b3e02c8e80a648f792ec63f796454847b (diff)
Squish: Optimization in checkLastBuild()
Change-Id: Id706efcf25e39d55a80ebfcd2ed0212c7f1a2324 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r--tests/system/shared/build_utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index 98ed0bdd9a..7811915546 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -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))