From e1b5baa21c976354b8dba5189a305c5606f6c34b Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 22 Nov 2023 15:13:20 +0100 Subject: [PATCH] Blacklist tst_QGuiEventLoop::processEvents on QNX The test log shows flaky failures of this test several times a day on QNX, so blacklist it. To do that, we need to be able to isolate the "GUI" mode of this test. To do that, add a single data tag that depends on whether the test project is built for GUI or Core, and blacklist only the "gui" data tag. Task-number: QTBUG-119359 Change-Id: I91c2380de0a3febedcf781f27fed4a1fa6aa5515 Reviewed-by: Fabian Kosmale (cherry picked from commit d2c6e9ab99f3c4ad6f9b896e0684b0369d5e944d) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/kernel/qeventloop/BLACKLIST | 2 ++ .../corelib/kernel/qeventloop/tst_qeventloop.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/auto/corelib/kernel/qeventloop/BLACKLIST diff --git a/tests/auto/corelib/kernel/qeventloop/BLACKLIST b/tests/auto/corelib/kernel/qeventloop/BLACKLIST new file mode 100644 index 00000000000..df20eefdbe0 --- /dev/null +++ b/tests/auto/corelib/kernel/qeventloop/BLACKLIST @@ -0,0 +1,2 @@ +[processEvents:gui] +qnx # QTBUG-119359 diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index 16437d39f92..9972237ce39 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -138,6 +138,7 @@ class tst_QEventLoop : public QObject Q_OBJECT private slots: // This test *must* run first. See the definition for why. + void processEvents_data(); void processEvents(); void exec(); void reexec(); @@ -159,8 +160,21 @@ protected: void customEvent(QEvent *e) override; }; +void tst_QEventLoop::processEvents_data() +{ + QTest::addColumn("mode"); + +#ifdef QT_GUI_LIB + QTest::addRow("gui") << "gui"; +#else + QTest::addRow("core") << "core"; +#endif +} + void tst_QEventLoop::processEvents() { + QFETCH(QString, mode); + QSignalSpy aboutToBlockSpy(QAbstractEventDispatcher::instance(), &QAbstractEventDispatcher::aboutToBlock); QSignalSpy awakeSpy(QAbstractEventDispatcher::instance(), &QAbstractEventDispatcher::awake);