From 39160e7dbd36eefea29daea96abf9039bba0407f Mon Sep 17 00:00:00 2001 From: Julius Zint Date: Wed, 16 Mar 2022 18:30:26 +0100 Subject: [PATCH] Remove no_xdg_runtime_dir_test [6/6] Make autotests create fake input devices This test was the only one where input() could return a nullptr. With this test removed, autotests can now expect input() to always return a sane valid value and are therefor simpler to write. That test belongs in kwayland-server anyway and kwayland-server's test suite already tests that starting without XDG_RUNTIME_DIR is a no-no thing --- autotests/integration/CMakeLists.txt | 1 - .../integration/no_xdg_runtime_dir_test.cpp | 36 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 autotests/integration/no_xdg_runtime_dir_test.cpp diff --git a/autotests/integration/CMakeLists.txt b/autotests/integration/CMakeLists.txt index aaa35ee76a..4c2d454289 100644 --- a/autotests/integration/CMakeLists.txt +++ b/autotests/integration/CMakeLists.txt @@ -98,7 +98,6 @@ integrationTest(WAYLAND_ONLY NAME testDontCrashNoBorder SRCS dont_crash_no_borde integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp) integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp ) integrationTest(WAYLAND_ONLY NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp ) -integrationTest(WAYLAND_ONLY NAME testNoXdgRuntimeDir SRCS no_xdg_runtime_dir_test.cpp) integrationTest(WAYLAND_ONLY NAME testScreenChanges SRCS screen_changes_test.cpp) integrationTest(NAME testModiferOnlyShortcut SRCS modifier_only_shortcut_test.cpp) if (KWIN_BUILD_TABBOX) diff --git a/autotests/integration/no_xdg_runtime_dir_test.cpp b/autotests/integration/no_xdg_runtime_dir_test.cpp deleted file mode 100644 index 057d97ecb0..0000000000 --- a/autotests/integration/no_xdg_runtime_dir_test.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - KWin - the KDE window manager - This file is part of the KDE project. - - SPDX-FileCopyrightText: 2016 Martin Gräßlin - - SPDX-License-Identifier: GPL-2.0-or-later -*/ -#include "kwin_wayland_test.h" -#include "wayland_server.h" - -using namespace KWin; - -static const QString s_socketName = QStringLiteral("wayland_test_kwin_no_xdg_runtime_dir-0"); - -class NoXdgRuntimeDirTest : public QObject -{ - Q_OBJECT -private Q_SLOTS: - void initTestCase(); - void testInitFails(); -}; - -void NoXdgRuntimeDirTest::initTestCase() -{ - qunsetenv("XDG_RUNTIME_DIR"); -} - -void NoXdgRuntimeDirTest::testInitFails() -{ - // this test verifies that without an XDG_RUNTIME_DIR the WaylandServer fails to start - QVERIFY(!waylandServer()->init(s_socketName)); -} - -WAYLANDTEST_MAIN(NoXdgRuntimeDirTest) -#include "no_xdg_runtime_dir_test.moc"