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");