From b8df93134d55e15b75e4b704fef36d3b6aa8305c Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 16 May 2014 13:50:25 +0200 Subject: Squish: Using param instead of global var in checkLastBuild() Change-Id: I9c7af050f9ff211cd5025fe5421449dcdee04f53 Reviewed-by: Christian Stenger --- tests/system/shared/build_utils.py | 8 +++----- tests/system/suite_APTW/tst_APTW03/test.py | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index d01ebd3543..98ed0bdd9a 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -29,13 +29,11 @@ import re; -# flag to indicate whether a tasks file should be created when building ends with errors -createTasksFileOnError = True - # this method checks the last build (if there's one) and logs the number of errors, warnings and # lines within the Issues output -# optional parameter can be used to tell this function if the build was expected to fail or not -def checkLastBuild(expectedToFail=False): +# param expectedToFail can be used to tell this function if the build was expected to fail or not +# param createTasksFileOnError whether a tasks file should be created when building ends with errors +def checkLastBuild(expectedToFail=False, createTasksFileOnError=True): try: # can't use waitForObject() 'cause visible is always 0 buildProg = findObject("{type='ProjectExplorer::Internal::BuildProgress' unnamed='1' }") diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py index fbc6c6cf63..19cc55ba95 100644 --- a/tests/system/suite_APTW/tst_APTW03/test.py +++ b/tests/system/suite_APTW/tst_APTW03/test.py @@ -98,9 +98,7 @@ def main(): invokeMenuItem('Build', 'Build Project "%s"' % projectName) waitForCompile(10000) if not virtualFunctionsAdded: - global createTasksFileOnError - createTasksFileOnError = False - checkLastBuild(True) + checkLastBuild(True, False) if not openDocument("%s.Headers.%s\.h" % (projectName, className.lower())): test.fail("Could not open %s.h - continuing." % className.lower()) continue -- cgit v1.2.1