From e242975e7dcb072549c68efb5fb39b60a29606b7 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 16 Feb 2022 16:25:11 +0100 Subject: tests: skip tst_QX11Info on Wayland MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I927ee28f61719ff1b67f73dc31dfcae9b73d8329 Reviewed-by: Tor Arne Vestbø (cherry picked from commit 760815599bc518f5a0f2d33398466867f07991b9) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/gui/platform/qx11info/tst_qx11info.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/gui/platform/qx11info/tst_qx11info.cpp b/tests/auto/gui/platform/qx11info/tst_qx11info.cpp index 0cd11c87ac..bc16552409 100644 --- a/tests/auto/gui/platform/qx11info/tst_qx11info.cpp +++ b/tests/auto/gui/platform/qx11info/tst_qx11info.cpp @@ -112,6 +112,8 @@ void tst_QX11Info::startupId() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); // This relies on the fact that no widget was shown yet, // so please make sure this method is always the first test. @@ -133,6 +135,8 @@ void tst_QX11Info::isPlatformX11() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); QVERIFY(QX11Info::isPlatformX11()); } @@ -141,6 +145,8 @@ void tst_QX11Info::appTime() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); // No X11 event received yet QCOMPARE(QX11Info::appTime(), 0ul); @@ -367,6 +373,8 @@ void tst_QX11Info::peeker() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); PeekerTest test; test.show(); @@ -378,6 +386,8 @@ void tst_QX11Info::isCompositingManagerRunning() { int argc = 0; QGuiApplication app(argc, 0); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("This test is only for X11, not Wayland."); const bool b = QX11Info::isCompositingManagerRunning(); Q_UNUSED(b); const bool b2 = QX11Info::isCompositingManagerRunning(0); -- cgit v1.2.3