Squish: Adapt tst_git_local

Committing has been made a 'bit less synchronous'.
So, wait a short amount of time to have the expected
output present, but fail if it does not appear within
that time frame.

Change-Id: I5f6c02dcec42800e876a4bae36e08596bedf0049
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2018-11-16 09:59:55 +01:00
parent d4e79230d8
commit d0e4f657c9

View File

@@ -46,8 +46,9 @@ def commit(commitMessage, expectedLogMessage, uncheckUntracked=False):
checkOrFixCommitterInformation('invalidEmailLabel', 'emailLineEdit', 'nobody@nowhere.com')
clickButton(waitForObject(":splitter.Commit File(s)_VcsBase::QActionPushButton"))
vcsLog = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}").plainText
test.verify(expectedLogMessage in str(vcsLog), "Searching for '%s' in log:\n%s " % (expectedLogMessage, vcsLog))
"window=':Qt Creator_Core::Internal::MainWindow'}")
test.verify(waitFor('expectedLogMessage in str(vcsLog.plainText)', 2000),
"Searching for '%s' in log:\n%s " % (expectedLogMessage, vcsLog.plainText))
return commitMessage
def verifyItemsInGit(commitMessages):