diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-27 09:44:58 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-28 13:35:46 +0000 |
commit | 80e03bbd9a42401d50af450aff5351c3a0c95444 (patch) | |
tree | 7c39e71f4f9fd5ca74003860b2645a917707b45c /tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp | |
parent | 50bc2ac834502b2051dccaaec22da010a3ef5e70 (diff) |
Ignore debugger failures with GCC on Windows
Capturing the output of the started process mysteriously fails on
Windows with gcc. While the nested event loop is run, the readyRead()
signal is never emitted. Only after the timer fired and the event loop
is terminated, we receive the output we were expecting.
Some tests needed adapting to the initializing sub-function failing in
QVERIFY/QCOMPARE calls, in order for the process to not crash and the
blacklisting to work.
Task-number: QTQAINFRA-1334
Change-Id: I4804d94580e7db65595137d19d7b75d75c243257
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp')
-rw-r--r-- | tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp index 940f89e936..738da048a3 100644 --- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp @@ -34,6 +34,7 @@ #include <private/qqmldebugconnection_p.h> #include <QtTest/qtest.h> +#include <private/qtestresult_p.h> #include <QtTest/qsignalspy.h> #include <QtNetwork/qhostaddress.h> #include <QtCore/qtimer.h> @@ -101,6 +102,10 @@ QmlDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRootObject( void tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices) { +#if defined(Q_OS_WIN) && defined(Q_CC_MINGW) + QSKIP("Capturing output while running nested event loop is not reliable on Windows/GCC"); +#endif + const QString argument = QString::fromLatin1("-qmljsdebugger=port:%1,%2,block%3") .arg(STR_PORT_FROM).arg(STR_PORT_TO) .arg(restrictServices ? QStringLiteral(",services:QmlDebugger,QmlInspector") : @@ -164,6 +169,8 @@ void tst_QQmlEngineDebugInspectorIntegration::connect() void tst_QQmlEngineDebugInspectorIntegration::objectLocationLookup() { init(true); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; bool success = false; QmlDebugObjectReference rootObject = findRootObject(); @@ -190,6 +197,9 @@ void tst_QQmlEngineDebugInspectorIntegration::objectLocationLookup() void tst_QQmlEngineDebugInspectorIntegration::select() { init(true); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; + QmlDebugObjectReference rootObject = findRootObject(); QList<int> childIds; int requestId = 0; @@ -207,6 +217,8 @@ void tst_QQmlEngineDebugInspectorIntegration::select() void tst_QQmlEngineDebugInspectorIntegration::createObject() { init(true); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; QString qml = QLatin1String("Rectangle {\n" " id: xxxyxxx\n" @@ -234,6 +246,10 @@ void tst_QQmlEngineDebugInspectorIntegration::createObject() void tst_QQmlEngineDebugInspectorIntegration::moveObject() { init(true); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; + + QCOMPARE(m_inspectorClient->state(), QQmlDebugClient::Enabled); QmlDebugObjectReference rootObject = findRootObject(); QVERIFY(rootObject.debugId != -1); QCOMPARE(rootObject.children.length(), 2); @@ -257,6 +273,10 @@ void tst_QQmlEngineDebugInspectorIntegration::moveObject() void tst_QQmlEngineDebugInspectorIntegration::destroyObject() { init(true); + if (QTest::currentTestFailed() || QTestResult::skipCurrentTest()) + return; + + QCOMPARE(m_inspectorClient->state(), QQmlDebugClient::Enabled); QmlDebugObjectReference rootObject = findRootObject(); QVERIFY(rootObject.debugId != -1); QCOMPARE(rootObject.children.length(), 2); |