From 0ba7f48d0729c3631a709ac1ea6b26b59a063eae Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 14 Dec 2012 10:13:05 +0100 Subject: [PATCH] Squish: Try to fix test for testing machines Change-Id: I3213594c9ad7b947c5863d22f87e62adf418d983 Reviewed-by: Robert Loehning --- tests/system/suite_editors/tst_modify_readonly/test.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py index c5de75a8536..389ee0574a3 100644 --- a/tests/system/suite_editors/tst_modify_readonly/test.py +++ b/tests/system/suite_editors/tst_modify_readonly/test.py @@ -82,10 +82,12 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' " "visible='1' window=%s}" % readOnlyMBoxStr)) try: - waitForObject(cannotResetStr, 3000) - # should not be possible - test.fail("Could not reset file '%s' to writable state." % currentFile) - clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr) + # avoid an AUT crash that happens frequently on the testing machines + if currentApplicationContext().isRunning: + waitForObject(cannotResetStr, 3000) + # should not be possible + test.fail("Could not reset file '%s' to writable state." % currentFile) + clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr) except: if isWritable(currentFile): test.passes("File '%s' resetted to writable state and saved." % currentFile)