From f8459a71ccacfb17f7603502a7e61096ee33a095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sat, 17 Nov 2018 09:52:53 +0100 Subject: [PATCH] Switch lockscreen test to OpenGL Summary: Main reason for using QPainter was the fact that build.kde.org did not support OpenGL back when the test got introduced. As we have vgem support nowadays we can switch back to OpenGL. Test Plan: 100% tests passed, 0 tests failed out of 130, but the test is flaky with and without this change Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16940 --- autotests/integration/lockscreen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 30ceafffdc..932ba41a39 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -182,6 +182,9 @@ AbstractClient *LockScreenTest::showWindow() void LockScreenTest::initTestCase() { + if (!QFile::exists(QStringLiteral("/dev/dri/card0"))) { + QSKIP("Needs a dri device"); + } qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -190,13 +193,13 @@ void LockScreenTest::initTestCase() QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); + qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); QVERIFY(workspaceCreatedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - setenv("QMLSCENE_DEVICE", "softwarecontext", true); waylandServer()->initWorkspace(); }