From fe4aaf9cc11467aa5cab0d9d1d2706b283719b0a Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 27 Mar 2018 10:04:26 +0200 Subject: QML Tooling: Wait for QML trace to be started in QML profiler test If we don't wait for anything else, we need to wait for at least the "trace started" message before we disable profiling. Otherwise we might disable the profiling before the first engine registers, which will give us no trace at all. Change-Id: I9fb64e82bd05c60640ffbbd2ece5e99edfa97f4a Reviewed-by: Simon Hausmann --- .../auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index cd8e4216f3..87c123b85d 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -525,6 +525,8 @@ void tst_QQmlProfilerService::connect() if (!traceEnabled) m_client->client->setRecording(true); + + QTRY_VERIFY(m_client->numLoadedEventTypes() > 0); m_client->client->setRecording(false); checkTraceReceived(); checkJsHeap(); @@ -643,6 +645,7 @@ void tst_QQmlProfilerService::controlFromJS() { QCOMPARE(connect(true, "controlFromJS.qml", false), ConnectSuccess); + QTRY_VERIFY(m_client->numLoadedEventTypes() > 0); m_client->client->setRecording(false); checkTraceReceived(); checkJsHeap(); -- cgit v1.2.3