From 260646ed62606a43de499c04ff57648262df7b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Fri, 16 Nov 2018 20:07:09 +0100 Subject: [PATCH] Delete kglobalshortcutsrc before executing a test Summary: When running the complete test suite the ScriptedEffectsTest::testShortcuts registers the shortcut meta+shift+y. But GlobalShortcutsTest::testX11ClientShortcut also tries to use this shortcut for a window shortcut which fails if it is already registered. So when running the complete test suite it depends on the order of execution whether the GlobalShortcutsTest passes or not. Test should be clean - also the globalshortcuts. As the config is read from test directory anyway, we can delete the file prior to init of kglobalaccel. Test Plan: Run ctest, test did not fail anymore Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16932 --- autotests/integration/kwin_wayland_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index b0d67e7aac..711ba20057 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -48,6 +48,8 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch : Application(mode, argc, argv) { QStandardPaths::setTestModeEnabled(true); + // TODO: add a test move to kglobalaccel instead? + QFile{QStandardPaths::locate(QStandardPaths::ConfigLocation, QStringLiteral("kglobalshortcutsrc"))}.remove(); QIcon::setThemeName(QStringLiteral("breeze")); #ifdef KWIN_BUILD_ACTIVITIES setUseKActivities(false);