forked from qt-creator/qt-creator
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 <christian.stenger@qt.io>
This commit is contained in:
@@ -55,7 +55,7 @@ def main():
|
|||||||
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
||||||
typeLines(editor, ["int main() {"])
|
typeLines(editor, ["int main() {"])
|
||||||
invokeMenuItem("File", "Save All")
|
invokeMenuItem("File", "Save All")
|
||||||
performDebugging(workingDir, projectName, checkedTargets)
|
performDebugging(projectName, checkedTargets)
|
||||||
invokeMenuItem("File", "Close All Projects and Editors")
|
invokeMenuItem("File", "Close All Projects and Editors")
|
||||||
# C/C++
|
# C/C++
|
||||||
targets = Targets.intToArray(Targets.desktopTargetClasses())
|
targets = Targets.intToArray(Targets.desktopTargetClasses())
|
||||||
@@ -75,7 +75,7 @@ def main():
|
|||||||
invokeMenuItem("File", "Save All")
|
invokeMenuItem("File", "Save All")
|
||||||
progressBarWait(15000)
|
progressBarWait(15000)
|
||||||
setRunInTerminal(1, 0, False)
|
setRunInTerminal(1, 0, False)
|
||||||
performDebugging(workingDir, projectName, [singleTarget])
|
performDebugging(projectName, [singleTarget])
|
||||||
invokeMenuItem("File", "Close All Projects and Editors")
|
invokeMenuItem("File", "Close All Projects and Editors")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|
||||||
@@ -89,15 +89,21 @@ def __handleAppOutputWaitForDebuggerFinish__():
|
|||||||
invokeMenuItem("Debug", "Abort Debugging")
|
invokeMenuItem("Debug", "Abort Debugging")
|
||||||
waitFor("str(appOutput.plainText).endswith('Debugging has finished')", 5000)
|
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"):
|
for kit, config in iterateBuildConfigs(len(checkedTargets), "Debug"):
|
||||||
test.log("Selecting '%s' as build config" % config)
|
test.log("Selecting '%s' as build config" % config)
|
||||||
verifyBuildConfig(len(checkedTargets), kit, config, True)
|
verifyBuildConfig(len(checkedTargets), kit, config, True, True)
|
||||||
progressBarWait(10000)
|
progressBarWait(10000)
|
||||||
invokeMenuItem("Build", "Rebuild All")
|
invokeMenuItem("Build", "Rebuild All")
|
||||||
waitForCompile()
|
waitForCompile()
|
||||||
isMsvc = isMsvcConfig(len(checkedTargets), kit)
|
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"))
|
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
|
||||||
handleDebuggerWarnings(config, isMsvc)
|
handleDebuggerWarnings(config, isMsvc)
|
||||||
waitForObject(":Qt Creator.DebugModeWidget_QSplitter")
|
waitForObject(":Qt Creator.DebugModeWidget_QSplitter")
|
||||||
@@ -112,4 +118,5 @@ def performDebugging(workingDir, projectName, checkedTargets):
|
|||||||
clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton"))
|
clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton"))
|
||||||
__handleAppOutputWaitForDebuggerFinish__()
|
__handleAppOutputWaitForDebuggerFinish__()
|
||||||
removeOldBreakpoints()
|
removeOldBreakpoints()
|
||||||
deleteAppFromWinFW(workingDir, projectName, False)
|
if platform.system() in ('Microsoft' 'Windows'):
|
||||||
|
deleteAppFromWinFW(buildDir, projectName, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user