2014-03-22 08:48:07 +00:00
|
|
|
add_definitions(-DKWIN_UNIT_TEST)
|
2015-11-05 14:14:06 +00:00
|
|
|
remove_definitions(-DQT_USE_QSTRINGBUILDER)
|
2016-07-18 06:47:45 +00:00
|
|
|
add_subdirectory(libkwineffects)
|
2016-06-29 08:29:45 +00:00
|
|
|
add_subdirectory(integration)
|
2018-01-23 16:28:18 +00:00
|
|
|
add_subdirectory(libinput)
|
2023-04-22 21:42:11 +00:00
|
|
|
# drm autotests are broken on FreeBSD for yet unknown reasons
|
|
|
|
# As the test isn't doing anything platform specific, only run it on Linux
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
add_subdirectory(drm)
|
|
|
|
endif()
|
2014-08-13 10:54:02 +00:00
|
|
|
|
2012-06-03 07:15:10 +00:00
|
|
|
########################################################
|
|
|
|
# Test WindowPaintData
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testWindowPaintData_SRCS test_window_paint_data.cpp)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testWindowPaintData ${testWindowPaintData_SRCS})
|
2021-01-30 16:18:21 +00:00
|
|
|
target_link_libraries(testWindowPaintData kwineffects Qt::Widgets Qt::Test )
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testWindowPaintData COMMAND testWindowPaintData)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testWindowPaintData)
|
2012-11-16 07:23:47 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test VirtualDesktopManager
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testVirtualDesktops_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../src/virtualdesktops.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
test_virtual_desktops.cpp
|
2014-01-07 12:45:25 +00:00
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS})
|
2014-01-07 12:45:25 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testVirtualDesktops
|
2022-04-22 09:27:33 +00:00
|
|
|
kwin
|
|
|
|
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::GlobalAccel
|
|
|
|
KF6::I18n
|
|
|
|
KF6::WindowSystem
|
2014-01-07 12:45:25 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testVirtualDesktops)
|
2013-01-07 07:07:27 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test ClientMachine
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testClientMachine_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../src/client_machine.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
test_client_machine.cpp
|
2022-02-02 03:35:13 +00:00
|
|
|
xcb_scaling_mock.cpp
|
2013-01-07 07:07:27 +00:00
|
|
|
)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testClientMachine ${testClientMachine_SRCS})
|
2017-07-29 16:47:58 +00:00
|
|
|
set_target_properties(testClientMachine PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
|
2013-01-07 07:07:27 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testClientMachine
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Concurrent
|
2023-02-25 20:21:59 +00:00
|
|
|
Qt::GuiPrivate
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::WindowSystem
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
|
|
|
XCB::XFIXES
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
${X11_X11_LIB} # to make jenkins happy
|
2013-01-07 07:07:27 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testClientMachine COMMAND testClientMachine)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testClientMachine)
|
2013-01-14 08:20:59 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test XcbWrapper
|
|
|
|
########################################################
|
2022-02-02 03:35:13 +00:00
|
|
|
add_executable(testXcbWrapper test_xcb_wrapper.cpp xcb_scaling_mock.cpp)
|
2019-09-17 09:15:35 +00:00
|
|
|
|
|
|
|
target_link_libraries(testXcbWrapper
|
2023-02-25 20:21:59 +00:00
|
|
|
Qt::GuiPrivate
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::WindowSystem
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
2013-01-14 08:20:59 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testXcbWrapper COMMAND testXcbWrapper)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testXcbWrapper)
|
2013-01-29 13:03:05 +00:00
|
|
|
|
2023-05-02 12:06:17 +00:00
|
|
|
add_executable(testXcbSizeHints test_xcb_size_hints.cpp xcb_scaling_mock.cpp)
|
|
|
|
set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
|
|
|
|
target_link_libraries(testXcbSizeHints
|
|
|
|
Qt::GuiPrivate
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
|
|
|
|
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::WindowSystem
|
|
|
|
|
|
|
|
XCB::ICCCM
|
|
|
|
XCB::XCB
|
|
|
|
)
|
|
|
|
add_test(NAME kwin-testXcbSizeHints COMMAND testXcbSizeHints)
|
|
|
|
ecm_mark_as_test(testXcbSizeHints)
|
2015-01-21 13:54:20 +00:00
|
|
|
|
2013-01-29 13:03:05 +00:00
|
|
|
########################################################
|
|
|
|
# Test XcbWindow
|
|
|
|
########################################################
|
2022-02-02 03:35:13 +00:00
|
|
|
add_executable(testXcbWindow test_xcb_window.cpp xcb_scaling_mock.cpp)
|
2019-09-17 09:15:35 +00:00
|
|
|
|
|
|
|
target_link_libraries(testXcbWindow
|
2023-02-25 20:21:59 +00:00
|
|
|
Qt::GuiPrivate
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::WindowSystem
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
2013-01-29 13:03:05 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testXcbWindow COMMAND testXcbWindow)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testXcbWindow)
|
2014-03-22 08:48:07 +00:00
|
|
|
|
2016-12-18 10:53:50 +00:00
|
|
|
########################################################
|
|
|
|
# Test OnScreenNotification
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testOnScreenNotification_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../src/input_event_spy.cpp
|
|
|
|
../src/onscreennotification.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
onscreennotificationtest.cpp
|
2016-12-18 10:53:50 +00:00
|
|
|
)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testOnScreenNotification ${testOnScreenNotification_SRCS})
|
2016-12-18 10:53:50 +00:00
|
|
|
|
|
|
|
target_link_libraries(testOnScreenNotification
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::DBus
|
|
|
|
Qt::Quick
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets # QAction include
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
2016-12-18 10:53:50 +00:00
|
|
|
)
|
|
|
|
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testOnScreenNotification COMMAND testOnScreenNotification)
|
2016-12-18 10:53:50 +00:00
|
|
|
ecm_mark_as_test(testOnScreenNotification)
|
2017-03-18 10:00:30 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test Gestures
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testGestures_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../src/gestures.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
test_gestures.cpp
|
2017-03-18 10:00:30 +00:00
|
|
|
)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testGestures ${testGestures_SRCS})
|
2017-03-18 10:00:30 +00:00
|
|
|
|
|
|
|
target_link_libraries(testGestures
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
2023-01-25 16:18:06 +00:00
|
|
|
Qt::Widgets
|
2017-03-18 10:00:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testGestures COMMAND testGestures)
|
2017-03-18 10:00:30 +00:00
|
|
|
ecm_mark_as_test(testGestures)
|
2017-05-05 17:16:38 +00:00
|
|
|
|
2017-05-03 19:17:25 +00:00
|
|
|
########################################################
|
|
|
|
# Test X11 TimestampUpdate
|
|
|
|
########################################################
|
|
|
|
add_executable(testX11TimestampUpdate test_x11_timestamp_update.cpp)
|
|
|
|
target_link_libraries(testX11TimestampUpdate
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::CoreAddons
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
2023-06-19 11:19:29 +00:00
|
|
|
Qt::GuiPrivate
|
2017-05-03 19:17:25 +00:00
|
|
|
kwin
|
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate)
|
2017-05-03 19:17:25 +00:00
|
|
|
ecm_mark_as_test(testX11TimestampUpdate)
|
2017-06-26 04:56:55 +00:00
|
|
|
|
2017-06-27 19:08:19 +00:00
|
|
|
set(testOpenGLContextAttributeBuilder_SRCS
|
2022-01-13 14:02:41 +00:00
|
|
|
../src/utils/abstract_opengl_context_attribute_builder.cpp
|
|
|
|
../src/utils/egl_context_attribute_builder.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
opengl_context_attribute_builder_test.cpp
|
2017-06-27 19:08:19 +00:00
|
|
|
)
|
|
|
|
|
2023-04-26 19:51:31 +00:00
|
|
|
if (HAVE_GLX)
|
2022-07-22 16:59:22 +00:00
|
|
|
set(testOpenGLContextAttributeBuilder_SRCS ${testOpenGLContextAttributeBuilder_SRCS} ../src/backends/x11/standalone/x11_standalone_glx_context_attribute_builder.cpp)
|
2017-06-27 19:08:19 +00:00
|
|
|
endif()
|
|
|
|
add_executable(testOpenGLContextAttributeBuilder ${testOpenGLContextAttributeBuilder_SRCS})
|
2022-10-31 20:52:56 +00:00
|
|
|
target_link_libraries(testOpenGLContextAttributeBuilder epoxy::epoxy Qt::Test)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testOpenGLContextAttributeBuilder COMMAND testOpenGLContextAttributeBuilder)
|
2017-06-26 04:56:55 +00:00
|
|
|
ecm_mark_as_test(testOpenGLContextAttributeBuilder)
|
2017-08-15 14:48:03 +00:00
|
|
|
|
|
|
|
set(testXkb_SRCS
|
2021-02-09 19:31:40 +00:00
|
|
|
../src/xkb.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
test_xkb.cpp
|
2017-08-15 14:48:03 +00:00
|
|
|
)
|
2022-09-08 22:18:12 +00:00
|
|
|
qt_add_dbus_interface(testXkb_SRCS ${CMAKE_SOURCE_DIR}/src/org.freedesktop.DBus.Properties.xml dbusproperties_interface)
|
2017-08-15 14:48:03 +00:00
|
|
|
add_executable(testXkb ${testXkb_SRCS})
|
|
|
|
target_link_libraries(testXkb
|
2022-04-22 09:27:33 +00:00
|
|
|
kwin
|
|
|
|
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Gui
|
2023-02-25 20:21:59 +00:00
|
|
|
Qt::GuiPrivate
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2023-02-24 18:22:37 +00:00
|
|
|
KF6::ConfigCore
|
|
|
|
KF6::WindowSystem
|
2019-09-18 10:31:02 +00:00
|
|
|
|
2021-10-04 16:36:32 +00:00
|
|
|
kwineffects
|
|
|
|
|
2021-03-02 01:14:39 +00:00
|
|
|
XKB::XKB
|
2017-08-15 14:48:03 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testXkb COMMAND testXkb)
|
2017-08-15 14:48:03 +00:00
|
|
|
ecm_mark_as_test(testXkb)
|
2017-10-05 16:58:57 +00:00
|
|
|
|
2020-09-07 08:11:47 +00:00
|
|
|
########################################################
|
|
|
|
# Test FTrace
|
|
|
|
########################################################
|
|
|
|
add_executable(testFtrace test_ftrace.cpp)
|
|
|
|
target_link_libraries(testFtrace
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
2020-09-07 08:11:47 +00:00
|
|
|
kwin
|
|
|
|
)
|
|
|
|
add_test(NAME kwin-testFtrace COMMAND testFtrace)
|
|
|
|
ecm_mark_as_test(testFtrace)
|
2022-08-16 14:04:10 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test KWin Utils
|
|
|
|
########################################################
|
|
|
|
add_executable(testUtils test_utils.cpp)
|
|
|
|
target_link_libraries(testUtils
|
|
|
|
Qt::Test
|
|
|
|
kwin
|
|
|
|
)
|
|
|
|
add_test(NAME kwin-testUtils COMMAND testUtils)
|
|
|
|
ecm_mark_as_test(testUtils)
|