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)
|
2016-05-20 13:48:11 +00:00
|
|
|
if (HAVE_INPUT)
|
|
|
|
add_subdirectory(libinput)
|
|
|
|
endif()
|
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
|
|
|
|
########################################################
|
|
|
|
set( testScreenPaintData_SRCS test_screen_paint_data.cpp )
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testScreenPaintData ${testScreenPaintData_SRCS})
|
2014-03-18 16:53:22 +00:00
|
|
|
target_link_libraries( testScreenPaintData kwineffects Qt5::Test Qt5::Widgets KF5::WindowSystem)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testScreenPaintData testScreenPaintData)
|
|
|
|
ecm_mark_as_test(testScreenPaintData)
|
2012-06-03 07:15:10 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test WindowPaintData
|
|
|
|
########################################################
|
|
|
|
set( testWindowPaintData_SRCS test_window_paint_data.cpp )
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testWindowPaintData ${testWindowPaintData_SRCS})
|
2013-08-20 07:10:18 +00:00
|
|
|
target_link_libraries( testWindowPaintData kwineffects Qt5::Widgets Qt5::Test )
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testWindowPaintData testWindowPaintData)
|
|
|
|
ecm_mark_as_test(testWindowPaintData)
|
2012-11-16 07:23:47 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test VirtualDesktopManager
|
|
|
|
########################################################
|
2014-01-07 12:45:25 +00:00
|
|
|
set( testVirtualDesktops_SRCS
|
|
|
|
test_virtual_desktops.cpp
|
|
|
|
../virtualdesktops.cpp
|
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS})
|
2014-01-07 12:45:25 +00:00
|
|
|
|
|
|
|
target_link_libraries( testVirtualDesktops
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::Widgets
|
|
|
|
KF5::I18n
|
|
|
|
KF5::GlobalAccel
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testVirtualDesktops testVirtualDesktops)
|
|
|
|
ecm_mark_as_test(testVirtualDesktops)
|
2013-01-07 07:07:27 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test ClientMachine
|
|
|
|
########################################################
|
|
|
|
set( testClientMachine_SRCS
|
|
|
|
test_client_machine.cpp
|
|
|
|
../client_machine.cpp
|
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable( testClientMachine ${testClientMachine_SRCS} )
|
2013-01-07 07:07:27 +00:00
|
|
|
|
|
|
|
target_link_libraries( testClientMachine
|
2013-10-02 13:23:56 +00:00
|
|
|
Qt5::Concurrent
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::Widgets
|
2013-06-27 07:06:16 +00:00
|
|
|
KF5::ConfigCore
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::WindowSystem
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XCB
|
|
|
|
XCB::XFIXES
|
2013-05-13 07:58:04 +00:00
|
|
|
${X11_X11_LIB} # to make jenkins happy
|
2013-01-07 07:07:27 +00:00
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testClientMachine testClientMachine)
|
|
|
|
ecm_mark_as_test(testClientMachine)
|
2013-01-14 08:20:59 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test XcbWrapper
|
|
|
|
########################################################
|
|
|
|
set( testXcbWrapper_SRCS
|
|
|
|
test_xcb_wrapper.cpp
|
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable( testXcbWrapper ${testXcbWrapper_SRCS} )
|
2013-01-14 08:20:59 +00:00
|
|
|
|
|
|
|
target_link_libraries( testXcbWrapper
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::Widgets
|
2016-01-29 08:48:02 +00:00
|
|
|
KF5::ConfigCore
|
2014-03-18 13:38:00 +00:00
|
|
|
KF5::WindowSystem
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XCB
|
2013-01-14 08:20:59 +00:00
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testXcbWrapper testXcbWrapper)
|
|
|
|
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)
|
|
|
|
add_executable( testXcbSizeHints test_xcb_size_hints.cpp )
|
|
|
|
target_link_libraries( testXcbSizeHints
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
2016-01-29 08:48:02 +00:00
|
|
|
KF5::ConfigCore
|
2015-01-21 13:54:20 +00:00
|
|
|
KF5::WindowSystem
|
|
|
|
XCB::XCB
|
|
|
|
XCB::ICCCM
|
|
|
|
)
|
|
|
|
add_test(kwin-testXcbSizeHints testXcbSizeHints)
|
|
|
|
ecm_mark_as_test(testXcbSizeHints)
|
|
|
|
endif()
|
|
|
|
|
2013-01-29 13:03:05 +00:00
|
|
|
########################################################
|
|
|
|
# Test XcbWindow
|
|
|
|
########################################################
|
|
|
|
set( testXcbWindow_SRCS
|
|
|
|
test_xcb_window.cpp
|
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_executable( testXcbWindow ${testXcbWindow_SRCS} )
|
2013-01-29 13:03:05 +00:00
|
|
|
|
|
|
|
target_link_libraries( testXcbWindow
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::Widgets
|
2016-01-29 08:48:02 +00:00
|
|
|
KF5::ConfigCore
|
2014-03-18 13:38:00 +00:00
|
|
|
KF5::WindowSystem
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XCB
|
2013-01-29 13:03:05 +00:00
|
|
|
)
|
2014-03-18 10:49:53 +00:00
|
|
|
add_test(kwin-testXcbWindow testXcbWindow)
|
|
|
|
ecm_mark_as_test(testXcbWindow)
|
2014-03-22 08:48:07 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test BuiltInEffectLoader
|
|
|
|
########################################################
|
|
|
|
set( testBuiltInEffectLoader_SRCS
|
|
|
|
test_builtin_effectloader.cpp
|
|
|
|
mock_effectshandler.cpp
|
|
|
|
../effectloader.cpp
|
|
|
|
)
|
|
|
|
add_executable( testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testBuiltInEffectLoader
|
2014-03-23 08:23:30 +00:00
|
|
|
Qt5::Concurrent
|
2014-03-22 08:48:07 +00:00
|
|
|
Qt5::Test
|
2016-11-11 08:59:46 +00:00
|
|
|
Qt5::X11Extras
|
2015-07-06 14:50:33 +00:00
|
|
|
KF5::Package
|
2014-03-22 08:48:07 +00:00
|
|
|
kwineffects
|
|
|
|
kwin4_effect_builtins
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin-testBuiltInEffectLoader testBuiltInEffectLoader)
|
|
|
|
ecm_mark_as_test(testBuiltInEffectLoader)
|
2014-03-23 08:23:30 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test ScriptedEffectLoader
|
|
|
|
########################################################
|
|
|
|
include_directories(${KWIN_SOURCE_DIR})
|
|
|
|
set( testScriptedEffectLoader_SRCS
|
|
|
|
test_scripted_effectloader.cpp
|
|
|
|
mock_effectshandler.cpp
|
|
|
|
../effectloader.cpp
|
|
|
|
../scripting/scriptedeffect.cpp
|
|
|
|
../scripting/scriptingutils.cpp
|
2015-07-31 11:24:56 +00:00
|
|
|
../scripting/scripting_logging.cpp
|
2014-03-23 08:23:30 +00:00
|
|
|
)
|
|
|
|
add_executable( testScriptedEffectLoader ${testScriptedEffectLoader_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testScriptedEffectLoader
|
|
|
|
Qt5::Concurrent
|
|
|
|
Qt5::Script
|
|
|
|
Qt5::Test
|
2016-11-11 08:59:46 +00:00
|
|
|
Qt5::X11Extras
|
2014-03-23 08:23:30 +00:00
|
|
|
KF5::ConfigGui
|
|
|
|
KF5::GlobalAccel
|
|
|
|
KF5::I18n
|
2015-07-06 14:50:33 +00:00
|
|
|
KF5::Package
|
2014-03-23 08:23:30 +00:00
|
|
|
kwineffects
|
|
|
|
kwin4_effect_builtins
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin-testScriptedEffectLoader testScriptedEffectLoader)
|
|
|
|
ecm_mark_as_test(testScriptedEffectLoader)
|
2014-03-25 10:39:07 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test PluginEffectLoader
|
|
|
|
########################################################
|
|
|
|
set( testPluginEffectLoader_SRCS
|
|
|
|
test_plugin_effectloader.cpp
|
|
|
|
mock_effectshandler.cpp
|
|
|
|
../effectloader.cpp
|
|
|
|
)
|
|
|
|
add_executable( testPluginEffectLoader ${testPluginEffectLoader_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testPluginEffectLoader
|
|
|
|
Qt5::Concurrent
|
|
|
|
Qt5::Test
|
2016-11-11 08:59:46 +00:00
|
|
|
Qt5::X11Extras
|
2015-07-06 14:50:33 +00:00
|
|
|
KF5::Package
|
2014-03-25 10:39:07 +00:00
|
|
|
kwineffects
|
|
|
|
kwin4_effect_builtins
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin-testPluginEffectLoader testPluginEffectLoader)
|
|
|
|
ecm_mark_as_test(testPluginEffectLoader)
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# FakeEffectPlugin
|
|
|
|
########################################################
|
|
|
|
add_library(fakeeffectplugin MODULE fakeeffectplugin.cpp)
|
|
|
|
set_target_properties(fakeeffectplugin PROPERTIES PREFIX "")
|
|
|
|
target_link_libraries(fakeeffectplugin kwineffects)
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# FakeEffectPlugin-Version
|
|
|
|
########################################################
|
|
|
|
add_library(effectversionplugin MODULE fakeeffectplugin_version.cpp)
|
|
|
|
set_target_properties(effectversionplugin PROPERTIES PREFIX "")
|
|
|
|
target_link_libraries(effectversionplugin kwineffects)
|
2014-09-17 08:29:03 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test Screens
|
|
|
|
########################################################
|
|
|
|
set( testScreens_SRCS
|
|
|
|
test_screens.cpp
|
2015-04-29 12:13:20 +00:00
|
|
|
mock_abstract_client.cpp
|
2014-09-17 08:29:03 +00:00
|
|
|
mock_client.cpp
|
|
|
|
mock_screens.cpp
|
|
|
|
mock_workspace.cpp
|
|
|
|
../screens.cpp
|
2014-04-17 15:33:11 +00:00
|
|
|
../x11eventfilter.cpp
|
2014-09-17 08:29:03 +00:00
|
|
|
)
|
|
|
|
kconfig_add_kcfg_files(testScreens_SRCS ../settings.kcfgc)
|
|
|
|
|
|
|
|
add_executable( testScreens ${testScreens_SRCS})
|
|
|
|
target_include_directories(testScreens BEFORE PRIVATE ./)
|
|
|
|
target_link_libraries(testScreens
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::ConfigGui
|
|
|
|
KF5::WindowSystem
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin_testScreens testScreens)
|
|
|
|
ecm_mark_as_test(testScreens)
|
2014-09-26 12:01:44 +00:00
|
|
|
|
2014-04-17 15:33:11 +00:00
|
|
|
########################################################
|
|
|
|
# Test XrandRScreens
|
|
|
|
########################################################
|
|
|
|
set( testXRandRScreens_SRCS
|
|
|
|
test_xrandr_screens.cpp
|
2015-04-29 12:13:20 +00:00
|
|
|
mock_abstract_client.cpp
|
2014-04-17 15:33:11 +00:00
|
|
|
mock_client.cpp
|
|
|
|
mock_screens.cpp
|
|
|
|
mock_workspace.cpp
|
|
|
|
../screens.cpp
|
2016-04-08 08:32:37 +00:00
|
|
|
../plugins/platforms/x11/standalone/screens_xrandr.cpp
|
2014-04-17 15:33:11 +00:00
|
|
|
../xcbutils.cpp # init of extensions
|
|
|
|
../x11eventfilter.cpp
|
|
|
|
)
|
|
|
|
kconfig_add_kcfg_files(testXRandRScreens_SRCS ../settings.kcfgc)
|
|
|
|
add_executable( testXRandRScreens ${testXRandRScreens_SRCS} )
|
|
|
|
target_link_libraries( testXRandRScreens
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::Gui
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::ConfigGui
|
|
|
|
KF5::WindowSystem
|
|
|
|
XCB::XCB
|
|
|
|
XCB::RANDR
|
|
|
|
XCB::XFIXES
|
|
|
|
XCB::SYNC
|
|
|
|
XCB::COMPOSITE
|
|
|
|
XCB::DAMAGE
|
|
|
|
XCB::GLX
|
|
|
|
XCB::SHM
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin-testXRandRScreens testXRandRScreens)
|
|
|
|
ecm_mark_as_test(testXRandRScreens)
|
|
|
|
|
2014-09-26 12:01:44 +00:00
|
|
|
########################################################
|
|
|
|
# Test ScreenEdges
|
|
|
|
########################################################
|
|
|
|
set( testScreenEdges_SRCS
|
|
|
|
test_screen_edges.cpp
|
2015-04-29 12:13:20 +00:00
|
|
|
mock_abstract_client.cpp
|
2014-09-26 12:01:44 +00:00
|
|
|
mock_client.cpp
|
|
|
|
mock_screens.cpp
|
|
|
|
mock_workspace.cpp
|
|
|
|
../atoms.cpp
|
|
|
|
../screens.cpp
|
|
|
|
../screenedge.cpp
|
|
|
|
../virtualdesktops.cpp
|
2015-09-30 13:06:01 +00:00
|
|
|
../xcbutils.cpp # init of extensions
|
2016-04-15 11:47:56 +00:00
|
|
|
../plugins/platforms/x11/standalone/edge.cpp
|
2014-09-26 12:01:44 +00:00
|
|
|
)
|
|
|
|
kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc)
|
|
|
|
qt5_add_dbus_interface( testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
|
|
|
|
|
|
|
add_executable( testScreenEdges ${testScreenEdges_SRCS})
|
|
|
|
target_include_directories(testScreenEdges BEFORE PRIVATE ./)
|
|
|
|
target_link_libraries(testScreenEdges
|
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::X11Extras
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::ConfigGui
|
|
|
|
KF5::I18n
|
|
|
|
KF5::GlobalAccel
|
|
|
|
KF5::WindowSystem
|
|
|
|
XCB::XCB
|
2015-09-30 13:06:01 +00:00
|
|
|
XCB::RANDR
|
|
|
|
XCB::XFIXES
|
|
|
|
XCB::SYNC
|
|
|
|
XCB::COMPOSITE
|
|
|
|
XCB::DAMAGE
|
|
|
|
XCB::GLX
|
|
|
|
XCB::SHM
|
2014-09-26 12:01:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin_testScreenEdges testScreenEdges)
|
|
|
|
ecm_mark_as_test(testScreenEdges)
|
2016-12-18 10:53:50 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test OnScreenNotification
|
|
|
|
########################################################
|
|
|
|
set( testOnScreenNotification_SRCS
|
|
|
|
onscreennotificationtest.cpp
|
|
|
|
../onscreennotification.cpp
|
|
|
|
)
|
|
|
|
add_executable( testOnScreenNotification ${testOnScreenNotification_SRCS})
|
|
|
|
|
|
|
|
target_link_libraries(testOnScreenNotification
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::Quick
|
|
|
|
KF5::ConfigCore
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(kwin-testOnScreenNotification testOnScreenNotification)
|
|
|
|
ecm_mark_as_test(testOnScreenNotification)
|