tests: skip tst_selftests on Wayland and XWayland

QWindow::requestActivate() is not supported.

We have one tst_selftests binary, and will test it with both xcb and
wayland qpa plugin. A runtime check and skip will have different
restult files, which is not implemented in testlib yet.

Task-number: QTBUG-107578
Pick-to: 6.4 6.2
Change-Id: Idc8cb24c6f42a9f0f4dc9493e3fd1a5803ba7ce0
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Liang Qi 2022-10-12 12:46:51 +02:00
parent f2aa04722a
commit bdd2b68696

View File

@ -636,6 +636,11 @@ bool TestLogger::shouldIgnoreTest(const QString &test) const
return true;
#endif
if (!qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY")) {
qDebug() << "TestLogger::shouldIgnoreTest() ignore" << test << "on wayland/xwayland!";
return true;
}
// These tests are affected by timing and whether the CPU tick counter
// is monotonically increasing. They won't work on some machines so
// leave them off by default. Feel free to enable them for your own