diff options
author | Eike Ziller <eike.ziller@qt.io> | 2023-05-08 09:17:56 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2023-05-08 09:17:56 +0200 |
commit | 591717191133e5e9cbd78aba99c7b28f0d6ad52c (patch) | |
tree | 4d901d7fd0952c76ce633a3a13fe175de6a70fe4 /tests | |
parent | c879aeb56550494a27d12d004cff6fb6f42fc511 (diff) | |
parent | e4f4ad8aa690e159cc4ad4cbd6f85dfce4fd4fc4 (diff) | |
download | qt-creator-591717191133e5e9cbd78aba99c7b28f0d6ad52c.tar.gz |
Merge remote-tracking branch 'origin/10.0' into temp
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
Change-Id: I877666cf9c209c5b0a1365aeb81d9cb13144a993
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/build_utils.py | 4 | ||||
-rw-r--r-- | tests/system/shared/clang.py | 2 | ||||
-rw-r--r-- | tests/system/shared/editor_utils.py | 4 | ||||
-rw-r--r-- | tests/system/shared/fs_utils.py | 2 | ||||
-rw-r--r-- | tests/system/shared/project.py | 4 | ||||
-rw-r--r-- | tests/system/shared/utils.py | 14 | ||||
-rw-r--r-- | tests/system/suite_HELP/tst_HELP02/test.py | 2 | ||||
-rw-r--r-- | tests/system/suite_tools/tst_codepasting/test.py | 6 |
8 files changed, 19 insertions, 19 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 74063c72f9..dd7677d473 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -21,11 +21,11 @@ def toggleIssuesFilter(filterName, checked): except: t,v = sys.exc_info()[:2] test.log("Exception while toggling filter '%s'" % filterName, - "%s(%s)" % (str(t), str(v))) + "%s: %s" % (t.__name__, str(v))) def getBuildIssues(ignoreCodeModel=True): - ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton") + ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton" , silent=True) model = waitForObject(":Qt Creator.Issues_QListView").model() if ignoreCodeModel: # filter out possible code model issues present inside the Issues pane diff --git a/tests/system/shared/clang.py b/tests/system/shared/clang.py index 1753d8e724..812ead3e6a 100644 --- a/tests/system/shared/clang.py +++ b/tests/system/shared/clang.py @@ -16,7 +16,7 @@ def startCreatorVerifyingClang(useClang): if strv == "startApplication() failed": test.fatal("%s. Creator built without ClangCodeModel?" % strv) else: - test.fatal("Exception caught", "%s(%s)" % (str(t), strv)) + test.fatal("Exception caught", "%s: %s" % (t.__name__, strv)) return False if platform.system() not in ('Microsoft', 'Windows'): # only Win uses dialogs for this return startedWithoutPluginError() diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index c1df47ac3e..de5619472e 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -67,7 +67,7 @@ def menuVisibleAtEditor(editor, menuInList): return success except: t, v = sys.exc_info()[:2] - test.log("Exception: %s" % str(t), str(v)) + test.log("Exception: %s" % t.__name__, str(v)) return False # this function checks whether the given global point (QPoint) @@ -413,7 +413,7 @@ def openDocument(treeElement): return False except: t,v = sys.exc_info()[:2] - test.log("An exception occurred in openDocument(): %s(%s)" % (str(t), str(v))) + test.log("An exception occurred in openDocument(): %s: %s" % (t.__name__, str(v))) return False def earlyExit(details="No additional information"): diff --git a/tests/system/shared/fs_utils.py b/tests/system/shared/fs_utils.py index 1bcc3c8185..af76c7c812 100644 --- a/tests/system/shared/fs_utils.py +++ b/tests/system/shared/fs_utils.py @@ -30,7 +30,7 @@ def changeFilePermissions(dirPath, readPerm, writePerm, excludeFileNames=None): os.chmod(filePath, permission) except: t,v = sys.exc_info()[:2] - test.log("Error: %s(%s)" % (str(t), str(v))) + test.log("%s: %s" % (t.__name__, str(v))) result = False return result diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index babbf0eb6e..7b58b95c9f 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -120,7 +120,7 @@ def __handleBuildSystem__(buildSystem): selectFromCombo(combo, buildSystem) except: t, v = sys.exc_info()[:2] - test.warning("Exception while handling build system", "%s(%s)" % (str(t), str(v))) + test.warning("Exception while handling build system", "%s: %s" % (t.__name__, str(v))) clickButton(waitForObject(":Next_QPushButton")) return buildSystem @@ -131,7 +131,7 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion): selectFromCombo(comboBox, minimumQtVersion) except: t,v = sys.exc_info()[:2] - test.fatal("Exception while trying to select Qt version", "%s (%s)" % (str(t), str(v))) + test.fatal("Exception while trying to select Qt version", "%s :%s" % (t.__name__, str(v))) clickButton(waitForObject(":Next_QPushButton")) return minimumQtVersion diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 96e63f29f0..9b4f2dc95a 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -25,7 +25,8 @@ def verifyChecked(objectName, checked=True): test.compare(object.checked, checked) return object -def ensureChecked(objectName, shouldBeChecked = True, timeout=20000): + +def ensureChecked(objectName, shouldBeChecked=True, timeout=20000, silent=False): if shouldBeChecked: targetState = Qt.Checked state = "checked" @@ -39,14 +40,13 @@ def ensureChecked(objectName, shouldBeChecked = True, timeout=20000): while not waitFor('widget.checkState() == targetState', 1500) and clicked < 2: clickButton(widget) clicked += 1 - test.verify(waitFor("widget.checkState() == targetState", 1000)) + silent or test.verify(waitFor("widget.checkState() == targetState", 1000)) except: # widgets not derived from QCheckbox don't have checkState() if not waitFor('widget.checked == shouldBeChecked', 1500): mouseClick(widget) - test.verify(waitFor("widget.checked == shouldBeChecked", 1000)) - test.log("New state for QCheckBox: %s" % state, - str(objectName)) + silent or test.verify(waitFor("widget.checked == shouldBeChecked", 1000)) + silent or test.log("New state for QCheckBox: %s" % state, str(objectName)) return widget # verify that an object is in an expected enable state. Returns the object. @@ -436,8 +436,8 @@ def iterateKits(clickOkWhenDone, alreadyOnOptionsDialog, t, v, _ = sys.exc_info() currResult = None test.fatal("Function to additionally execute on Options Dialog could not be " - "found or an exception occurred while executing it.", "%s(%s)" % - (str(t), str(v))) + "found or an exception occurred while executing it.", "%s: %s" % + (t.__name__, str(v))) additionalResult.append(currResult) if clickOkWhenDone: clickButton(waitForObject(":Options.OK_QPushButton")) diff --git a/tests/system/suite_HELP/tst_HELP02/test.py b/tests/system/suite_HELP/tst_HELP02/test.py index 0f8ff6767b..3601c81a37 100644 --- a/tests/system/suite_HELP/tst_HELP02/test.py +++ b/tests/system/suite_HELP/tst_HELP02/test.py @@ -41,7 +41,7 @@ def checkQtCreatorHelpVersion(expectedVersion): 'Verifying whether manual uses expected version.') except: t, v = sys.exc_info()[:2] - test.log("Exception caught", "%s(%s)" % (str(t), str(v))) + test.log("Exception caught", "%s: %s" % (t.__name__, str(v))) test.fail("Missing Qt Creator Manual.") diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index 5db5a28c90..3d4507095f 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -34,8 +34,8 @@ def closeHTTPStatusAndPasterDialog(protocol, pasterDialog): test.log("Closed dialog without expected error.", text) except: t,v = sys.exc_info()[:2] - test.warning("An exception occurred in closeHTTPStatusAndPasterDialog(): %s(%s)" - % (str(t), str(v))) + test.warning("An exception occurred in closeHTTPStatusAndPasterDialog(): %s: %s" + % (t.__name__, str(v))) return False def pasteFile(sourceFile, protocol): @@ -167,7 +167,7 @@ def checkForMovedUrl(): # protocol may be redirected (HTTP status 30x) - check test.fail("URL has moved permanently.", match[0].group(0)) except: t,v,tb = sys.exc_info() - test.log(str(t), str(v)) + test.log("%s: %s" % (t.__name__, str(v))) def main(): startQC() |