aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-10-17 09:24:09 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 12:53:26 +0200
commita8cfbf6aa61c85bd082583388e5cfac84e0f4d3f (patch)
tree2d3dac830cba9b00d126c0757bda13610a7d13d6 /tests
parentf5e39c4164dcb37972ccb934b13ad802625e5905 (diff)
Fix flaky QQmlProfilerService::scenegraphData test
QSGRenderThread::syncAndRender first triggers the frameSwapped() signal, and only then adds the SceneGraphRenderLoopFrame message. We're waiting for the frameSwapped signal to stop profiling, and therefore can't be sure whether we'll get the final SceneGraphRenderLoopFrame message or not. Task-number: QTBUG-33024 Change-Id: I3216667e8e5cdc79f210290ce22cc6b08c579b6a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index b9aefb33e4..902e525dd6 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -459,22 +459,21 @@ void tst_QQmlProfilerService::scenegraphData()
// check that at least one frame was rendered
// there should be a SGPolishAndSync + SGRendererFrame + SGRenderLoopFrame sequence
+ // (though we can't be sure to get the SGRenderLoopFrame in the threaded renderer)
+ //
// since the rendering happens in a different thread, there could be other unrelated events interleaved
int loopcheck = 0;
foreach (const QQmlProfilerData &msg, m_client->traceMessages) {
if (msg.messageType == QQmlProfilerClient::SceneGraphFrame) {
if (loopcheck == 0 && msg.detailType == QQmlProfilerClient::SceneGraphContextFrame)
loopcheck = 1;
- else
- if (loopcheck == 1 && msg.detailType == QQmlProfilerClient::SceneGraphRendererFrame)
+ else if (loopcheck == 1 && msg.detailType == QQmlProfilerClient::SceneGraphRendererFrame)
loopcheck = 2;
- else
- if (loopcheck == 2 && msg.detailType == QQmlProfilerClient::SceneGraphRenderLoopFrame)
+ else if (loopcheck == 2 && msg.detailType == QQmlProfilerClient::SceneGraphRenderLoopFrame)
loopcheck = 3;
}
}
-
- QCOMPARE(loopcheck, 3);
+ QVERIFY(loopcheck >= 2);
}
void tst_QQmlProfilerService::profileOnExit()