aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@digia.com>2014-05-15 11:39:33 +0200
committerRobert Loehning <robert.loehning@digia.com>2014-05-15 12:17:31 +0200
commit556ec551d77cc9349e8c07ba290d8a2049d6d1c5 (patch)
tree89de36cd909361cc7d5f21eacaff7233c97d90a4
parent6f36614cb55640c067d9aa4cdba630238a1baf10 (diff)
Squish: Selecting right config in verifyBuildConfig
...by just calling selectBuildConfig. Change-Id: I8f07b3d874c22ebeca8e5cf658d754cf231c7ad0 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r--tests/system/shared/build_utils.py11
-rw-r--r--tests/system/suite_debugger/tst_debug_empty_main/test.py3
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/test.py3
-rw-r--r--tests/system/suite_debugger/tst_simple_debug/test.py3
4 files changed, 9 insertions, 11 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index b1b6322613..d01ebd3543 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -161,18 +161,18 @@ def iterateBuildConfigs(kitCount, filter = ""):
# param targetCount specifies the number of targets currently defined (must be correct!)
# param currentTarget specifies the target for which to switch into the specified settings (zero based index)
# param configName is the name of the configuration that should be selected
+# param afterSwitchTo the ViewConstant of the mode to switch to after selecting or None
# returns information about the selected kit, see getQtInformationForBuildSettings
-def selectBuildConfig(targetCount, currentTarget, configName):
+def selectBuildConfig(targetCount, currentTarget, configName, afterSwitchTo=ViewConstants.EDIT):
switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD)
selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName)
progressBarWait(30000)
- return getQtInformationForBuildSettings(targetCount, True, ViewConstants.EDIT)
+ return getQtInformationForBuildSettings(targetCount, True, afterSwitchTo)
# This will not trigger a rebuild. If needed, caller has to do this.
-def verifyBuildConfig(targetCount, currentTarget, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False):
- switchViewTo(ViewConstants.PROJECTS)
- switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD)
+def verifyBuildConfig(targetCount, currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False):
+ qtInfo = selectBuildConfig(targetCount, currentTarget, configName, None)
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
ensureChecked("{name='shadowBuildCheckBox' type='QCheckBox' visible='1'}", enableShadowBuild)
buildCfCombo = waitForObject("{type='QComboBox' name='buildConfigurationComboBox' visible='1' "
@@ -210,6 +210,7 @@ def verifyBuildConfig(targetCount, currentTarget, shouldBeDebug=False, enableSha
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
switchViewTo(ViewConstants.EDIT)
+ return qtInfo
# verify if building and running of project was successful
def verifyBuildAndRun():
diff --git a/tests/system/suite_debugger/tst_debug_empty_main/test.py b/tests/system/suite_debugger/tst_debug_empty_main/test.py
index a8444b7826..f4636dcf0a 100644
--- a/tests/system/suite_debugger/tst_debug_empty_main/test.py
+++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py
@@ -94,8 +94,7 @@ def __handleAppOutputWaitForDebuggerFinish__():
def performDebugging(workingDir, projectName, checkedTargets):
for kit, config in iterateBuildConfigs(len(checkedTargets), "Debug"):
test.log("Selecting '%s' as build config" % config)
- selectBuildConfig(len(checkedTargets), kit, config)
- verifyBuildConfig(len(checkedTargets), kit, True)
+ verifyBuildConfig(len(checkedTargets), kit, config, True)
progressBarWait(10000)
invokeMenuItem("Build", "Rebuild All")
waitForCompile()
diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py
index 9ac28b149b..da890c743e 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/test.py
+++ b/tests/system/suite_debugger/tst_simple_analyze/test.py
@@ -73,9 +73,8 @@ def performTest(workingDir, projectName, targetCount, availableConfigs, disableO
# switching from MSVC to MinGW build will fail on the clean step of 'Rebuild All' because
# of differences between MSVC's and MinGW's Makefile (so clean before switching kits)
invokeMenuItem('Build', 'Clean Project "%s"' % projectName)
- qtVersion = selectBuildConfig(targetCount, kit, config)[0]
+ qtVersion = verifyBuildConfig(targetCount, kit, config, True, enableQmlDebug=True)[0]
test.log("Selected kit using Qt %s" % qtVersion)
- verifyBuildConfig(targetCount, kit, True, enableQmlDebug=True)
if disableOptimizer:
batchEditRunEnvironment(targetCount, kit, ["QML_DISABLE_OPTIMIZER=1"])
switchViewTo(ViewConstants.EDIT)
diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py
index 1af223bf11..d7a0f6b5f6 100644
--- a/tests/system/suite_debugger/tst_simple_debug/test.py
+++ b/tests/system/suite_debugger/tst_simple_debug/test.py
@@ -63,8 +63,7 @@ def main():
test.fatal("Haven't found a suitable Qt version (need Qt 4.7.4) - leaving without debugging.")
for kit, config in availableConfigs:
test.log("Selecting '%s' as build config" % config)
- selectBuildConfig(len(checkedTargets), kit, config)
- verifyBuildConfig(len(checkedTargets), kit, True, enableQmlDebug=True)
+ verifyBuildConfig(len(checkedTargets), kit, config, True, enableQmlDebug=True)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
waitForCompile(300000)