Squish: Fix debugging console app test

Change-Id: I752dab65948952081752a805018cfc3b01193855
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2022-03-18 13:08:28 +01:00
parent 7012aa621c
commit de1a328390
2 changed files with 7 additions and 5 deletions

View File

@@ -42,7 +42,8 @@ def handleDebuggerWarnings(config, isMsvcBuild=False):
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Dialog_Debugger::Internal::SymbolPathsDialog'}", 10000))
except LookupError:
pass # No warning. Fine.
if "Release" in config and (isMsvcBuild or platform.system() == "Linux"):
isReleaseConfig = "Release" in config and not "with Debug Information" in config
if isReleaseConfig and (isMsvcBuild or platform.system() == "Linux"):
msgBox = "{type='QMessageBox' unnamed='1' visible='1' windowTitle='Warning'}"
message = waitForObject("{name='qt_msgbox_label' type='QLabel' visible='1' window=%s}" % msgBox)
messageText = str(message.text)

View File

@@ -50,9 +50,10 @@ def main():
'Waiter();'])
# Rely on code completion for closing bracket
invokeMenuItem("File", "Save All")
openDocument(project + "." + project + "\\.pro")
proEditor = waitForObject(":Qt Creator_TextEditor::TextEditorWidget")
test.verify("CONFIG += c++11 console" in str(proEditor.plainText),
openDocument(project + ".CMakeLists\\.txt")
projectFileEditor = waitForObject(":Qt Creator_TextEditor::TextEditorWidget")
projectFileContent = str(projectFileEditor.plainText)
test.verify("Widgets" not in projectFileContent and "MACOSX_BUNDLE" not in projectFileContent,
"Verifying that program is configured with console")
availableConfigs = iterateBuildConfigs()
@@ -88,7 +89,7 @@ def main():
test.log("Debugging application")
isMsvc = isMsvcConfig(kit)
invokeMenuItem("Debug", "Start Debugging", "Start debugging of startup project")
invokeMenuItem("Debug", "Start Debugging", "Start Debugging of Startup Project")
handleDebuggerWarnings(config, isMsvc)
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
outputWindow = waitForObject(":Qt Creator_Core::OutputWindow")