summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/system/shared/build_utils.py25
-rwxr-xr-xtests/system/suite_APTW/shared/aptw.py6
-rwxr-xr-xtests/system/suite_CCOM/tst_CCOM01/test.py10
-rw-r--r--tests/system/suite_SCOM/tst_SCOM01/test.py10
-rw-r--r--tests/system/suite_SCOM/tst_SCOM04/test.py10
-rw-r--r--tests/system/suite_debugger/tst_build_new_project/test.py6
-rw-r--r--tests/system/suite_debugger/tst_cli_output_console/test.py6
-rw-r--r--tests/system/suite_debugger/tst_simple_debug/test.py8
-rw-r--r--tests/system/suite_general/tst_build_speedcrunch/test.py6
9 files changed, 45 insertions, 42 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index 1f5f5f43f8..a404ba6503 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -132,19 +132,22 @@ def createTasksFile(list):
file.close()
test.log("Written tasks file %s" % outfile)
-# returns a list of the build configurations for a target
-# 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)
+# returns a list of pairs each containing the zero based number of a kit
+# and the name of the matching build configuration
+# param kitCount specifies the number of kits currently defined (must be correct!)
# param filter is a regular expression to filter the configuration by their name
-def iterateBuildConfigs(targetCount, currentTarget, filter = ""):
+def iterateBuildConfigs(kitCount, filter = ""):
switchViewTo(ViewConstants.PROJECTS)
- switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD)
- model = waitForObject(":scrollArea.Edit build configuration:_QComboBox", 20000).model()
- prog = re.compile(filter)
- # for each row in the model, write its data to a list
- configNames = dumpItems(model)
- # pick only those configuration names which pass the filter
- configs = [config for config in configNames if prog.match(config)]
+ configs = []
+ for currentKit in range(kitCount):
+ switchToBuildOrRunSettingsFor(kitCount, currentKit, ProjectSettings.BUILD)
+ model = waitForObject(":scrollArea.Edit build configuration:_QComboBox", 20000).model()
+ prog = re.compile(filter)
+ # for each row in the model, write its data to a list
+ configNames = dumpItems(model)
+ # pick only those configuration names which pass the filter
+ configs += zip([currentKit] * len(configNames),
+ [config for config in configNames if prog.match(config)])
switchViewTo(ViewConstants.EDIT)
return configs
diff --git a/tests/system/suite_APTW/shared/aptw.py b/tests/system/suite_APTW/shared/aptw.py
index fbffbfe30a..313b9c2063 100755
--- a/tests/system/suite_APTW/shared/aptw.py
+++ b/tests/system/suite_APTW/shared/aptw.py
@@ -15,14 +15,14 @@ def verifyBuildAndRun():
# pick version 4.7.4 and then run project for debug and release
def pickVersion474runVerify():
- availableConfigs = iterateBuildConfigs(1, 0)
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
test.fatal("Haven't found needed Qt version (Qt 4.7.4), quitting")
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
# select debug configuration
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
test.log("Using build config '%s'" % config)
runAndCloseApp()
verifyBuildAndRun()
diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py
index 95a7cb497b..1968b5d721 100755
--- a/tests/system/suite_CCOM/tst_CCOM01/test.py
+++ b/tests/system/suite_CCOM/tst_CCOM01/test.py
@@ -14,12 +14,12 @@ def main():
startApplication("qtcreator" + SettingsPath)
# open example project
openQmakeProject(examplePath)
- # build and wait until finished - on all (except Qt 4.7.0 (would fail)) build configurations
- availableConfigs = iterateBuildConfigs(1, 0)
+ # build and wait until finished - on all build configurations
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
- test.fatal("Haven't found a suitable Qt version (anything except Qt 4.7.0) - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ test.fatal("Haven't found a suitable Qt version - leaving without building.")
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
# try to build project
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Build All")
diff --git a/tests/system/suite_SCOM/tst_SCOM01/test.py b/tests/system/suite_SCOM/tst_SCOM01/test.py
index df7578df06..94871997a1 100644
--- a/tests/system/suite_SCOM/tst_SCOM01/test.py
+++ b/tests/system/suite_SCOM/tst_SCOM01/test.py
@@ -6,12 +6,12 @@ def main():
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
- # build it - on all (except Qt 4.7.0 (would fail)) build configurations
- availableConfigs = iterateBuildConfigs(1, 0)
+ # build it - on all build configurations
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
- test.fatal("Haven't found a suitable Qt version (anything except Qt 4.7.0) - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ test.fatal("Haven't found a suitable Qt version - leaving without building.")
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
diff --git a/tests/system/suite_SCOM/tst_SCOM04/test.py b/tests/system/suite_SCOM/tst_SCOM04/test.py
index 369dbe0b76..da81053eaa 100644
--- a/tests/system/suite_SCOM/tst_SCOM04/test.py
+++ b/tests/system/suite_SCOM/tst_SCOM04/test.py
@@ -16,12 +16,12 @@ def main():
return
# save all
invokeMenuItem("File", "Save All")
- # build it - on all (except Qt 4.7.0 (would fail)) build configurations
- availableConfigs = iterateBuildConfigs(1, 0)
+ # build it - on all build configurations
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
- test.fatal("Haven't found a suitable Qt version (anything except Qt 4.7.0) - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ test.fatal("Haven't found a suitable Qt version - leaving without building.")
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
diff --git a/tests/system/suite_debugger/tst_build_new_project/test.py b/tests/system/suite_debugger/tst_build_new_project/test.py
index 4474bbdc32..db6771c9f2 100644
--- a/tests/system/suite_debugger/tst_build_new_project/test.py
+++ b/tests/system/suite_debugger/tst_build_new_project/test.py
@@ -5,11 +5,11 @@ project = "SquishProject"
def main():
startApplication("qtcreator" + SettingsPath)
createProject_Qt_Console(tempDir(), project)
- availableConfigs = iterateBuildConfigs(1, 0)
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
test.log("Testing build configuration: " + config)
runAndCloseApp()
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py
index 02b4588f06..f04e0e4959 100644
--- a/tests/system/suite_debugger/tst_cli_output_console/test.py
+++ b/tests/system/suite_debugger/tst_cli_output_console/test.py
@@ -36,11 +36,11 @@ def main():
test.verify("CONFIG += console" in str(proEditor.plainText), "Verifying that program is configured with console")
setRunInTerminal(1, 0, False)
- availableConfigs = iterateBuildConfigs(1, 0)
+ availableConfigs = iterateBuildConfigs(1)
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
test.log("Testing build configuration: " + config)
test.log("Running application")
diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py
index 525ce8502a..5d0a12490e 100644
--- a/tests/system/suite_debugger/tst_simple_debug/test.py
+++ b/tests/system/suite_debugger/tst_simple_debug/test.py
@@ -33,13 +33,13 @@ def main():
if result:
expectedBreakpointsOrder = [{"main.cpp":9}, {"main.qml":13}]
# Only use 4.7.4 to work around QTBUG-25187
- availableConfigs = iterateBuildConfigs(1, 0, "Debug")
+ availableConfigs = iterateBuildConfigs(1, "Debug")
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Qt 4.7.4) - leaving without debugging.")
- for config in availableConfigs:
+ for kit, config in availableConfigs:
test.log("Selecting '%s' as build config" % config)
- selectBuildConfig(1, 0, config)
- verifyBuildConfig(1, 0, True, enableQmlDebug=True)
+ selectBuildConfig(1, kit, config)
+ verifyBuildConfig(1, kit, True, enableQmlDebug=True)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}",
diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py
index b1b553eea2..ccd55dcefd 100644
--- a/tests/system/suite_general/tst_build_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_build_speedcrunch/test.py
@@ -20,11 +20,11 @@ def main():
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
- availableConfigs = iterateBuildConfigs(1, 0, "Release")
+ availableConfigs = iterateBuildConfigs(1, "Release")
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Release build) - leaving without building.")
- for config in availableConfigs:
- selectBuildConfig(1, 0, config)
+ for kit, config in availableConfigs:
+ selectBuildConfig(1, kit, config)
buildConfig = buildConfigFromFancyToolButton(fancyToolButton)
if buildConfig != config:
test.fatal("Build configuration %s is selected instead of %s" % (buildConfig, config))