From bad6b2c290d344ec467952e7101142bee2bc3c64 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 7 Feb 2023 08:24:21 +0100 Subject: SquishTests: Avoid crash in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workaround crash inside a test that may happen if the test tries to wait for an object when the AUT is gone already. Check for a clean exit and only if this is not the case try to continue with the error handling. Change-Id: I65f3e72cd343ec527ad822de915bc0c49c263153 Reviewed-by: Robert Löhning --- tests/system/suite_editors/tst_modify_readonly/test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/system') diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py index 0bb68a8ed3..d947ade6aa 100644 --- a/tests/system/suite_editors/tst_modify_readonly/test.py +++ b/tests/system/suite_editors/tst_modify_readonly/test.py @@ -85,6 +85,13 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): except: test.fatal("Missing dialog regarding missing permission on read only files.") exitCanceled = False + + # workaround crashing test + # (AUT stopped responding / AUT '' did not respond to network communication) + __shutdownDone__ = lambda : not currentApplicationContext().isRunning + if test.verify(waitFor(__shutdownDone__, 1000), "Clean exit of Qt Creator."): + return + try: mBoxStr = "{type='QMessageBox' unnamed='1' visible='1' text?='*Could not save the files.'}" msgBox = waitForObject(mBoxStr, 3000) -- cgit v1.2.1 From ff65caf62faa1e5c9411c26ccacbf21263fa3393 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 Feb 2023 12:57:55 +0100 Subject: SquishTests: Explicitly convert QString to str MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idcd70a18ed5535d8ad76c09007558cb96f20d178 Reviewed-by: Robert Löhning --- tests/system/shared/build_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/system') diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 05afc9c493..e1525276d2 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -56,7 +56,7 @@ def waitForCompile(timeout=60000): def dumpBuildIssues(listModel): issueDump = [] for index in dumpIndices(listModel): - issueDump.extend([[index.data(role).toString() for role + issueDump.extend([[str(index.data(role).toString()) for role in range(Qt.UserRole, Qt.UserRole + 6)]]) return issueDump -- cgit v1.2.1