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
Change-Id: Idc8cb24c6f42a9f0f4dc9493e3fd1a5803ba7ce0
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit bdd2b68696738c773224ce2936a161da9d3ad3bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2022-10-12 12:46:51 +02:00 committed by Qt Cherry-pick Bot
parent 893ffbf0ad
commit e2808d7037

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