diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-01-29 16:33:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-29 17:27:55 +0100 |
commit | 0c7ef1b350dd826334370a70e1d3b6b47e08a731 (patch) | |
tree | a971a9319b91dc0acef9b04eebbfbdbf87dfdf02 /tests | |
parent | 1d2c34572f63fe6cee34ed863b2175b4115a0ed2 (diff) |
Properly wait for stdout in test
Assuming all output is available on the first readyReadStandardOutput()
signal leads to flaky test results.
Change-Id: I442d7edc905abc067d6c32a4a55afd42ed03e3c9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index 9d2e0ecbb4..a122846220 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -406,9 +406,9 @@ void tst_QQmlProfilerService::pixmapCacheData() m_client->setTraceState(true); QVERIFY(QQmlDebugTest::waitForSignal(m_process, SIGNAL(readyReadStandardOutput()))); - QVERIFY(m_process->output().indexOf(QLatin1String("image loaded")) != -1 || - m_process->output().indexOf(QLatin1String("image error")) != -1 ); - + while (m_process->output().indexOf(QLatin1String("image loaded")) == -1 && + m_process->output().indexOf(QLatin1String("image error")) == -1) + QVERIFY(QQmlDebugTest::waitForSignal(m_process, SIGNAL(readyReadStandardOutput()))); m_client->setTraceState(false); |