2016-05-30 16:03:42 +00:00
|
|
|
include_directories(${Libinput_INCLUDE_DIRS})
|
2020-04-01 22:41:38 +00:00
|
|
|
|
2020-08-17 07:56:21 +00:00
|
|
|
add_definitions(-DKWIN_BUILD_TESTING)
|
2022-08-29 07:55:49 +00:00
|
|
|
add_library(LibInputTestObjects STATIC ../../src/backends/libinput/device.cpp ../../src/backends/libinput/events.cpp ../../src/core/inputdevice.cpp ../../src/mousebuttons.cpp mock_libinput.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(LibInputTestObjects Qt::Test Qt::Widgets Qt::DBus Qt::Gui KF6::ConfigCore)
|
2021-02-09 19:31:40 +00:00
|
|
|
target_include_directories(LibInputTestObjects PUBLIC ${CMAKE_SOURCE_DIR}/src)
|
2020-04-01 22:41:38 +00:00
|
|
|
|
2016-05-20 13:48:11 +00:00
|
|
|
########################################################
|
|
|
|
# Test Devices
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputDevice device_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputDevice Qt::Test Qt::DBus Qt::Gui KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputDevice COMMAND testLibinputDevice)
|
2016-05-20 13:48:11 +00:00
|
|
|
ecm_mark_as_test(testLibinputDevice)
|
2016-05-24 08:57:57 +00:00
|
|
|
|
2016-05-30 15:46:53 +00:00
|
|
|
########################################################
|
|
|
|
# Test Key Event
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputKeyEvent key_event_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputKeyEvent Qt::Test Qt::DBus Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputKeyEvent COMMAND testLibinputKeyEvent)
|
2016-05-30 15:46:53 +00:00
|
|
|
ecm_mark_as_test(testLibinputKeyEvent)
|
|
|
|
|
2016-05-31 07:23:12 +00:00
|
|
|
########################################################
|
|
|
|
# Test Pointer Event
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputPointerEvent pointer_event_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputPointerEvent Qt::Test Qt::DBus Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputPointerEvent COMMAND testLibinputPointerEvent)
|
2016-05-31 07:23:12 +00:00
|
|
|
ecm_mark_as_test(testLibinputPointerEvent)
|
|
|
|
|
2016-05-31 08:14:28 +00:00
|
|
|
########################################################
|
|
|
|
# Test Touch Event
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputTouchEvent touch_event_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputTouchEvent Qt::Test Qt::DBus Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputTouchEvent COMMAND testLibinputTouchEvent)
|
2016-05-31 08:14:28 +00:00
|
|
|
ecm_mark_as_test(testLibinputTouchEvent)
|
|
|
|
|
2016-08-05 12:35:33 +00:00
|
|
|
########################################################
|
|
|
|
# Test Gesture Event
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputGestureEvent gesture_event_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputGestureEvent Qt::Test Qt::DBus Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputGestureEvent COMMAND testLibinputGestureEvent)
|
2016-08-05 12:35:33 +00:00
|
|
|
ecm_mark_as_test(testLibinputGestureEvent)
|
|
|
|
|
2017-12-27 16:57:00 +00:00
|
|
|
########################################################
|
|
|
|
# Test Switch Event
|
|
|
|
########################################################
|
2020-04-01 22:41:38 +00:00
|
|
|
add_executable(testLibinputSwitchEvent switch_event_test.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testLibinputSwitchEvent Qt::Test Qt::DBus Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2018-01-16 19:54:11 +00:00
|
|
|
add_test(NAME kwin-testLibinputSwitchEvent COMMAND testLibinputSwitchEvent)
|
|
|
|
ecm_mark_as_test(testLibinputSwitchEvent)
|
2017-12-27 16:57:00 +00:00
|
|
|
|
2016-05-24 08:57:57 +00:00
|
|
|
########################################################
|
|
|
|
# Test Input Events
|
|
|
|
########################################################
|
2021-02-09 19:31:40 +00:00
|
|
|
add_executable(testInputEvents input_event_test.cpp ../../src/input_event.cpp)
|
2023-02-24 18:22:37 +00:00
|
|
|
target_link_libraries(testInputEvents Qt::Test Qt::DBus Qt::Gui Qt::Widgets KF6::ConfigCore LibInputTestObjects)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testInputEvents COMMAND testInputEvents)
|
2016-05-24 08:57:57 +00:00
|
|
|
ecm_mark_as_test(testInputEvents)
|