Commit 556ec551 authored by Robert Loehning's avatar Robert Loehning

Squish: Selecting right config in verifyBuildConfig

...by just calling selectBuildConfig.

Change-Id: I8f07b3d874c22ebeca8e5cf658d754cf231c7ad0
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 6f36614c
......@@ -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():
......
......@@ -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()
......
......@@ -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)
......
......@@ -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)
......
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