From fb119f3c56a38356f41ff4cd59e3e8cd4649008b Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Fri, 21 Nov 2025 06:30:04 -0500 Subject: [PATCH] refactor: skip wl-clipboard test when not on wayland but wl-clipboard is installed --- src/unittests/platform/WlClipboardTests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/unittests/platform/WlClipboardTests.cpp b/src/unittests/platform/WlClipboardTests.cpp index 28d90c90f..9bd72f2c3 100644 --- a/src/unittests/platform/WlClipboardTests.cpp +++ b/src/unittests/platform/WlClipboardTests.cpp @@ -7,6 +7,7 @@ #include "WlClipboardTests.h" #include "base/LogLevel.h" +#include "common/PlatformInfo.h" #include "deskflow/ClipboardTypes.h" #include "platform/WlClipboard.h" @@ -41,6 +42,11 @@ void WlClipboardTests::initTestCase() m_arch.init(); m_log.setFilter(LogLevel::Debug2); + // Only run tests if Wayland clipboard tools are available + if (!deskflow::platform::isWayland()) { + QSKIP("not running on wayland skipping Wayland clipboard tests"); + } + // Only run tests if Wayland clipboard tools are available if (!WlClipboard::isAvailable()) { QSKIP("wl-clipboard tools not available, skipping Wayland clipboard tests");