diff options
author | Liang Qi <liang.qi@qt.io> | 2022-02-16 16:25:11 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-17 01:44:08 +0000 |
commit | e242975e7dcb072549c68efb5fb39b60a29606b7 (patch) | |
tree | e8435d11af30adca954832e00d255ef1dce9dfc6 | |
parent | bff9584372934336eeacd5db147d9ff3da269b33 (diff) |
tests: skip tst_QX11Info on Wayland
Change-Id: I927ee28f61719ff1b67f73dc31dfcae9b73d8329
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 760815599bc518f5a0f2d33398466867f07991b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/gui/platform/qx11info/tst_qx11info.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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); |