diff options
author | Robert Loehning <robert.loehning@theqtcompany.com> | 2016-05-18 13:34:19 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2016-05-25 15:34:38 +0000 |
commit | 80ef8d11f904dcfc9dddd0984085d9fee71baa30 (patch) | |
tree | c422cf621e5a5980a68315ad1fcde4b35cd0b311 /tests | |
parent | 0e299cbd0b55b9815942f289eee7cd972584cae4 (diff) | |
download | qt-creator-80ef8d11f904dcfc9dddd0984085d9fee71baa30.tar.gz |
Squish: Handle failing startApplication() without ClangCodeModel
Change-Id: Ic50939219c8dcf2b04423d99d0d5021de8f26afc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/clang.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/system/shared/clang.py b/tests/system/shared/clang.py index 37b0cc1858..70a0e8ac67 100644 --- a/tests/system/shared/clang.py +++ b/tests/system/shared/clang.py @@ -24,8 +24,17 @@ ############################################################################ def startCreatorTryingClang(): - # start Qt Creator with enabled ClangCodeModel plugin (without modifying settings) - startApplication("qtcreator -load ClangCodeModel" + SettingsPath) + try: + # start Qt Creator with enabled ClangCodeModel plugin (without modifying settings) + startApplication("qtcreator -load ClangCodeModel" + SettingsPath) + except RuntimeError: + t, v = sys.exc_info()[:2] + strv = str(v) + if strv == "startApplication() failed": + test.fatal("%s. Creator built without ClangCodeModel?" % strv) + else: + test.fatal("Exception caught", "%s(%s)" % (str(t), strv)) + return False errorMsg = "{type='QMessageBox' unnamed='1' visible='1' windowTitle='Qt Creator'}" errorOK = "{text='OK' type='QPushButton' unnamed='1' visible='1' window=%s}" % errorMsg if not waitFor("object.exists(errorOK)", 5000): |