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-01 08:21:19 +00:00
|
|
|
add_subdirectory(libxrenderutils)
|
2016-06-29 08:29:45 +00:00
|
|
|
add_subdirectory(integration)
|
2018-01-23 16:28:18 +00:00
|
|
|
add_subdirectory(libinput)
|
2016-06-29 08:38:17 +00:00
|
|
|
add_subdirectory(tabbox)
|
2014-08-13 10:54:02 +00:00
|
|
|
|
2012-06-03 07:15:10 +00:00
|
|
|
########################################################
|
|
|
|
# Test ScreenPaintData
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testScreenPaintData_SRCS test_screen_paint_data.cpp)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testScreenPaintData ${testScreenPaintData_SRCS})
|
2021-01-30 16:18:21 +00:00
|
|
|
target_link_libraries(testScreenPaintData kwineffects Qt::Test Qt::Widgets KF5::WindowSystem)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testScreenPaintData COMMAND testScreenPaintData)
|
2014-03-18 10:49:53 +00:00
|
|
|
ecm_mark_as_test(testScreenPaintData)
|
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
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::GlobalAccel
|
|
|
|
KF5::I18n
|
|
|
|
KF5::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
|
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
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
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
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testClientMachine Qt::X11Extras)
|
|
|
|
else()
|
|
|
|
target_link_libraries(testClientMachine Qt::GuiPrivate)
|
|
|
|
endif()
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testXcbWrapper_SRCS
|
|
|
|
test_xcb_wrapper.cpp
|
2013-01-14 08:20:59 +00:00
|
|
|
)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testXcbWrapper ${testXcbWrapper_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testXcbWrapper
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
2013-01-14 08:20:59 +00:00
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testXcbWrapper Qt::X11Extras)
|
|
|
|
else()
|
|
|
|
target_link_libraries(testXcbWrapper Qt::GuiPrivate)
|
|
|
|
endif()
|
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
|
|
|
|
2015-01-21 13:54:20 +00:00
|
|
|
if (XCB_ICCCM_FOUND)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testXcbSizeHints test_xcb_size_hints.cpp)
|
2017-07-29 16:47:58 +00:00
|
|
|
set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testXcbSizeHints
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::ICCCM
|
|
|
|
XCB::XCB
|
2015-01-21 13:54:20 +00:00
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testXcbSizeHints Qt::X11Extras)
|
|
|
|
else()
|
|
|
|
target_link_libraries(testXcbSizeHints Qt::GuiPrivate)
|
|
|
|
endif()
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testXcbSizeHints COMMAND testXcbSizeHints)
|
2015-01-21 13:54:20 +00:00
|
|
|
ecm_mark_as_test(testXcbSizeHints)
|
|
|
|
endif()
|
|
|
|
|
2013-01-29 13:03:05 +00:00
|
|
|
########################################################
|
|
|
|
# Test XcbWindow
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testXcbWindow_SRCS
|
|
|
|
test_xcb_window.cpp
|
2013-01-29 13:03:05 +00:00
|
|
|
)
|
2019-09-17 09:15:35 +00:00
|
|
|
add_executable(testXcbWindow ${testXcbWindow_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testXcbWindow
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
2013-01-29 13:03:05 +00:00
|
|
|
)
|
2022-03-09 16:25:44 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testXcbWindow Qt::X11Extras)
|
|
|
|
else()
|
|
|
|
target_link_libraries(testXcbWindow Qt::GuiPrivate)
|
|
|
|
endif()
|
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
|
|
|
|
2021-02-09 19:31:40 +00:00
|
|
|
include_directories(${KWin_SOURCE_DIR}/src)
|
2014-09-17 08:29:03 +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
|
|
|
|
|
|
|
KF5::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
|
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
|
2017-08-24 19:48:29 +00:00
|
|
|
KF5::CoreAddons
|
2021-01-30 16:18:21 +00:00
|
|
|
Qt::Test
|
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
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_EPOXY_GLX)
|
2021-10-31 17:25:26 +00:00
|
|
|
set(testOpenGLContextAttributeBuilder_SRCS ${testOpenGLContextAttributeBuilder_SRCS} ../src/backends/x11/standalone/glx_context_attribute_builder.cpp)
|
2017-06-27 19:08:19 +00:00
|
|
|
endif()
|
|
|
|
add_executable(testOpenGLContextAttributeBuilder ${testOpenGLContextAttributeBuilder_SRCS})
|
2021-01-30 16:18:21 +00:00
|
|
|
target_link_libraries(testOpenGLContextAttributeBuilder 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
|
|
|
)
|
|
|
|
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
|
|
|
|
Qt::Test
|
|
|
|
Qt::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
|
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
|
|
|
)
|
2022-03-10 18:11:26 +00:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(testXkb Qt5::XkbCommonSupportPrivate)
|
2022-03-18 14:36:54 +00:00
|
|
|
else()
|
|
|
|
target_link_libraries(testXkb Qt::GuiPrivate)
|
2022-03-10 18:11:26 +00:00
|
|
|
endif()
|
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)
|