diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-04-07 01:00:53 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-04-09 09:59:36 +0200 |
commit | 61b7f5a0c1280d93d00c74e393c8244be626168c (patch) | |
tree | 86d41573a283227dfbae92fe1249709914bb388e /tests | |
parent | feeec8daa8412219dadddfb6e7cfa17f59451a32 (diff) | |
parent | d868bb4f3e4b0424fd4a2989ff1c82692b0f014c (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
Change-Id: Ifb27c6096297c729caff68945b3f710ce2009521
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp | 12 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 17 |
2 files changed, 23 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index 7d31940ee4..37118f4bd0 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -126,8 +126,10 @@ void tst_QQmlDebuggingEnabler::qmlscene() } QCOMPARE(m_process->state(), QProcess::Running); - if (!blockMode) - QTRY_VERIFY(m_process->output().contains(QLatin1String("qml: Component.onCompleted"))); + if (!blockMode) { + QTRY_VERIFY_WITH_TIMEOUT(m_process->output().contains( + QLatin1String("Component.onCompleted")), 15000); + } } void tst_QQmlDebuggingEnabler::custom_data() @@ -171,8 +173,10 @@ void tst_QQmlDebuggingEnabler::custom() } QCOMPARE(m_process->state(), QProcess::Running); - if (!blockMode) - QTRY_VERIFY(m_process->output().contains(QLatin1String("QQmlEngine created"))); + if (!blockMode) { + QTRY_VERIFY_WITH_TIMEOUT(m_process->output().contains(QLatin1String("QQmlEngine created")), + 15000); + } } QTEST_MAIN(tst_QQmlDebuggingEnabler) diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp index f2b44a4d95..562804bc45 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -753,11 +753,24 @@ void tst_QQmlProfilerService::memory() QVERIFY(smallItems > 5); } +static bool hasCompileEvents(const QVector<QQmlProfilerEventType> &types) +{ + for (const QQmlProfilerEventType &type : types) { + if (type.message() == QQmlProfilerDefinitions::MaximumMessage + && type.rangeType() == QQmlProfilerDefinitions::Compiling) + return true; + } + return false; +} + void tst_QQmlProfilerService::compile() { - connect(true, "test.qml"); + // Flush interval so that we actually get the events before we stop recording. + connect(true, "test.qml", true, 100); - QTRY_VERIFY(m_client->numLoadedEventTypes() > 0); + // We need to check specifically for compile events as we can otherwise stop recording after the + // StartTrace has arrived, but before it compiles anything. + QTRY_VERIFY(hasCompileEvents(m_client->types)); m_client->client->setRecording(false); checkTraceReceived(); |