From 80e03bbd9a42401d50af450aff5351c3a0c95444 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 27 Jul 2017 09:44:58 +0200 Subject: Ignore debugger failures with GCC on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../tst_qqmlenginedebuginspectorintegration.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp') 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 #include +#include #include #include #include @@ -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 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); -- cgit v1.2.3