From f562f867fcbab4482d2b1e6df4bd111dc738cd4c Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@qt.io>
Date: Fri, 22 Jul 2016 15:14:27 +0200
Subject: [PATCH] Squish: Use shadow builds in tst_simple_debug

So MSVC2010 and MSVC2013 don't get in their way.

Change-Id: Ib32c30dc0cc960756bb423348d88452aa20fbfcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
---
 tests/system/objects.map                            |  1 +
 .../system/suite_debugger/tst_simple_debug/test.py  | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tests/system/objects.map b/tests/system/objects.map
index 9c78f4ec13e..b3a313a0859 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -164,6 +164,7 @@
 :Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton	{occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
 :Qt Creator_SystemSettings.Details_Utils::DetailsButton	{occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
 :Qt Creator_TextEditor::TextEditorWidget	{type='TextEditor::TextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:Qt Creator_Utils::BuildDirectoryLineEdit	{occurrence='2' type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
 :Qt Creator_Utils::NavigationTreeView	{type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
 :Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit	{container=':Qt Creator_Utils::NavigationTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'}
 :Qt Gui Application.Form file:_QLabel	{name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'}
diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py
index b6646b7f224..14c250acad2 100644
--- a/tests/system/suite_debugger/tst_simple_debug/test.py
+++ b/tests/system/suite_debugger/tst_simple_debug/test.py
@@ -58,14 +58,20 @@ def main():
                 test.fatal("Haven't found a suitable Qt version - leaving without debugging.")
             for kit, config in availableConfigs:
                 test.log("Selecting '%s' as build config" % config)
-                verifyBuildConfig(len(checkedTargets), kit, config, True, enableQmlDebug=True)
+                verifyBuildConfig(len(checkedTargets), kit, config, True, True, True)
                 # explicitly build before start debugging for adding the executable as allowed program to WinFW
                 invokeMenuItem("Build", "Rebuild All")
                 waitForCompile(300000)
                 if not checkCompile():
                     test.fatal("Compile had errors... Skipping current build config")
                     continue
-                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)
                 if not doSimpleDebugging(len(checkedTargets), kit, config,
                                          len(expectedBreakpointsOrder), expectedBreakpointsOrder):
                     try:
@@ -74,7 +80,8 @@ def main():
                             clickButton(stopB)
                     except:
                         pass
-                deleteAppFromWinFW(workingDir, projectName, False)
+                if platform.system() in ('Microsoft' 'Windows'):
+                    deleteAppFromWinFW(buildDir, projectName, None)
                 # close application output window of current run to avoid mixing older output on the next run
                 ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
                 clickButton(waitForObject("{type='CloseButton' unnamed='1' visible='1' "
-- 
GitLab