From f43348c4f28b43ec38de1606675a1a3551640370 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 15 Mar 2022 15:34:22 +0100 Subject: Squish: More corrections due to change of default build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia221e1e84784f5218d14258fcc24dcac900d60ad Reviewed-by: Robert Löhning --- tests/system/shared/build_utils.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'tests/system/shared/build_utils.py') diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index f74bea0df1..a58a1fa93d 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -163,13 +163,17 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT): test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo) # This will not trigger a rebuild. If needed, caller has to do this. -def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False): +def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, + enableQmlDebug=False, buildSystem=None): selectBuildConfig(currentTarget, configName, None) ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton")) - ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'} " - "type='QCheckBox' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild) + + if buildSystem == "qmake": + ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'} " + "type='QCheckBox' unnamed='1' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild) + buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' " "type='QComboBox' unnamed='1' visible='1'}") if shouldBeDebug: @@ -184,11 +188,15 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad pass # Since waitForObject waits for the object to be enabled, # it will wait here until compilation of the debug libraries has finished. + runCMakeButton = ("{type='QPushButton' text='Run CMake' unnamed='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}") if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX): qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox') if selectFromCombo(qmlDebuggingCombo, 'Enable'): - # Don't rebuild now - clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000)) + if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply + clickButton(waitForObject(runCMakeButton)) + elif buildSystem == "qmake": # Don't rebuild now + clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000)) try: problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' " "type='QLabel' name='problemLabel' visible='1'}", 1000) @@ -201,8 +209,10 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox') if selectFromCombo(qmlDebuggingCombo, "Disable"): test.log("Qml debugging libraries are available - unchecked qml debugging.") - # Don't rebuild now - clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000)) + if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply + clickButton(waitForObject(runCMakeButton)) + elif buildSystem == "qmake": # Don't rebuild now + clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000)) clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton")) switchViewTo(ViewConstants.EDIT) -- cgit v1.2.1