diff options
author | Christian Stenger <christian.stenger@qt.io> | 2021-06-18 12:57:18 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2021-06-21 11:12:21 +0000 |
commit | ae8d9af6f43a909b2a7006e4268d2faca5efa8c1 (patch) | |
tree | 312e8f98485c659e502a27933021207dc29ad6e1 | |
parent | 8ec23e44a2b85a83f3b17ee05191d47006c83727 (diff) | |
download | qt-creator-ae8d9af6f43a909b2a7006e4268d2faca5efa8c1.tar.gz |
Squish: Fix expectations
The output on finishing debugging had changed.
Change-Id: I8193718594c0aceef13867d6acd1c8c0aaba6353
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
-rw-r--r-- | tests/system/suite_debugger/tst_debug_empty_main/test.py | 9 |
1 files changed, 7 insertions, 2 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 5a639d5dac..e9ff73c6d0 100644 --- a/tests/system/suite_debugger/tst_debug_empty_main/test.py +++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py @@ -81,14 +81,19 @@ def main(): invokeMenuItem("File", "Exit") def __handleAppOutputWaitForDebuggerFinish__(): + def __lastLine__(editor): + lines = str(editor.plainText).strip().splitlines() + return lines[-1] if len(lines) else "" + ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") appOutput = waitForObject("{type='Core::OutputWindow' visible='1' " "windowTitle='Application Output Window'}") - if not test.verify(waitFor("str(appOutput.plainText).rstrip().endswith('Debugging has finished')", 20000), + regex = re.compile(r".*Debugging of .* has finished( with exit code -?[0-9]+)?\.$") + if not test.verify(waitFor("regex.match(__lastLine__(appOutput))", 20000), "Verifying whether debugging has finished."): test.log("Aborting debugging to let test continue.") invokeMenuItem("Debug", "Abort Debugging") - waitFor("str(appOutput.plainText).endswith('Debugging has finished')", 5000) + waitFor("regex.match(__lastLine(appOutput))", 5000) def performDebugging(projectName): for kit, config in iterateBuildConfigs("Debug"): |