From 84f84890fd83f33b72c97f333e460870c853261c Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 26 Jul 2016 13:19:22 +0200 Subject: [PATCH] Squish: Use shadow builds in tst_debug_empty_main So MSVC2010 and MSVC2013 don't get in their way. Change-Id: Idb248e86dbe904e2f3867d793b80119f7e2dc31c Reviewed-by: Christian Stenger --- .../tst_debug_empty_main/test.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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 c06dcefc262..f371b5ec22d 100644 --- a/tests/system/suite_debugger/tst_debug_empty_main/test.py +++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py @@ -55,7 +55,7 @@ def main(): editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") typeLines(editor, ["int main() {"]) invokeMenuItem("File", "Save All") - performDebugging(workingDir, projectName, checkedTargets) + performDebugging(projectName, checkedTargets) invokeMenuItem("File", "Close All Projects and Editors") # C/C++ targets = Targets.intToArray(Targets.desktopTargetClasses()) @@ -75,7 +75,7 @@ def main(): invokeMenuItem("File", "Save All") progressBarWait(15000) setRunInTerminal(1, 0, False) - performDebugging(workingDir, projectName, [singleTarget]) + performDebugging(projectName, [singleTarget]) invokeMenuItem("File", "Close All Projects and Editors") invokeMenuItem("File", "Exit") @@ -89,15 +89,21 @@ def __handleAppOutputWaitForDebuggerFinish__(): invokeMenuItem("Debug", "Abort Debugging") waitFor("str(appOutput.plainText).endswith('Debugging has finished')", 5000) -def performDebugging(workingDir, projectName, checkedTargets): +def performDebugging(projectName, checkedTargets): for kit, config in iterateBuildConfigs(len(checkedTargets), "Debug"): test.log("Selecting '%s' as build config" % config) - verifyBuildConfig(len(checkedTargets), kit, config, True) + verifyBuildConfig(len(checkedTargets), kit, config, True, True) progressBarWait(10000) invokeMenuItem("Build", "Rebuild All") waitForCompile() isMsvc = isMsvcConfig(len(checkedTargets), kit) - allowAppThroughWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + switchViewTo(ViewConstants.PROJECTS) + switchToBuildOrRunSettingsFor(len(checkedTargets), kit, ProjectSettings.BUILD) + buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), + "debug") + switchViewTo(ViewConstants.EDIT) + allowAppThroughWinFW(buildDir, projectName, None) clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton")) handleDebuggerWarnings(config, isMsvc) waitForObject(":Qt Creator.DebugModeWidget_QSplitter") @@ -112,4 +118,5 @@ def performDebugging(workingDir, projectName, checkedTargets): clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton")) __handleAppOutputWaitForDebuggerFinish__() removeOldBreakpoints() - deleteAppFromWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + deleteAppFromWinFW(buildDir, projectName, None)