diff options
author | Robert Loehning <robert.loehning@digia.com> | 2013-01-23 16:28:54 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@digia.com> | 2013-01-24 17:05:18 +0100 |
commit | db7d64f15f7afa77c6214419c6358a1f41f75dcf (patch) | |
tree | a9b5abc2942f425a17334140267c75506f5d4f44 | |
parent | 28d731c71771590f768dcb2f5be4506e4ed80833 (diff) | |
download | qt-creator-db7d64f15f7afa77c6214419c6358a1f41f75dcf.tar.gz |
Squish: Made tst_cli_output_console more robust
Change-Id: I00941b2d6f984e3af553d48fdfa747f3d6d1ffd8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r-- | tests/system/suite_debugger/tst_cli_output_console/test.py | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py index e4cbc23ceb..93b0afb4d8 100644 --- a/tests/system/suite_debugger/tst_cli_output_console/test.py +++ b/tests/system/suite_debugger/tst_cli_output_console/test.py @@ -48,11 +48,16 @@ def main(): waitFor("runControlFinished==True", 20000) if not runControlFinished: test.warning("Waiting for runControlFinished timed out") - appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText) - verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output") - verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output") - verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output") - clickButton(waitForObject(":Qt Creator_CloseButton")) + ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") + try: + appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText) + verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output") + verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output") + verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output") + clickButton(waitForObject(":Qt Creator_CloseButton")) + except: + test.fatal("Could not find Application Output Window", + "Did the application run at all?") test.log("Debugging application") isMsvc = isMsvcConfig(len(checkedTargets), kit) @@ -79,11 +84,16 @@ def main(): else: test.fatal("Debugger log did not behave as expected. Please check manually.") switchViewTo(ViewConstants.EDIT) - appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText) - if not isMsvc: - verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output") - verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output") - verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output") - clickButton(waitForObject(":Qt Creator_CloseButton")) + ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") + try: + appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText) + if not isMsvc: + verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output") + verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output") + verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output") + clickButton(waitForObject(":Qt Creator_CloseButton")) + except: + test.fatal("Could not find Application Output Window", + "Did the application run at all?") invokeMenuItem("File", "Exit") |