2016-05-30 16:03:42 +00:00
|
|
|
include_directories(${Libinput_INCLUDE_DIRS})
|
2016-06-02 05:46:09 +00:00
|
|
|
include_directories(${UDEV_INCLUDE_DIR})
|
2016-05-20 13:48:11 +00:00
|
|
|
########################################################
|
|
|
|
# Test Devices
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputDevice_SRCS device_test.cpp mock_libinput.cpp ../../libinput/device.cpp )
|
2016-05-20 13:48:11 +00:00
|
|
|
add_executable(testLibinputDevice ${testLibinputDevice_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputDevice Qt5::Test Qt5::DBus Qt5::Gui KF5::ConfigCore)
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputKeyEvent_SRCS
|
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
|
|
|
key_event_test.cpp
|
|
|
|
mock_libinput.cpp
|
|
|
|
)
|
2016-05-30 15:46:53 +00:00
|
|
|
add_executable(testLibinputKeyEvent ${testLibinputKeyEvent_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputKeyEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputPointerEvent_SRCS
|
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
|
|
|
mock_libinput.cpp
|
|
|
|
pointer_event_test.cpp
|
|
|
|
)
|
2016-05-31 07:23:12 +00:00
|
|
|
add_executable(testLibinputPointerEvent ${testLibinputPointerEvent_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputPointerEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputTouchEvent_SRCS
|
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
|
|
|
mock_libinput.cpp
|
|
|
|
touch_event_test.cpp
|
|
|
|
)
|
2016-05-31 08:14:28 +00:00
|
|
|
add_executable(testLibinputTouchEvent ${testLibinputTouchEvent_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputTouchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputGestureEvent_SRCS
|
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
|
|
|
gesture_event_test.cpp
|
|
|
|
mock_libinput.cpp
|
|
|
|
)
|
2016-08-05 12:35:33 +00:00
|
|
|
add_executable(testLibinputGestureEvent ${testLibinputGestureEvent_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputGestureEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
|
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
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputSwitchEvent_SRCS
|
2018-01-16 19:54:11 +00:00
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
mock_libinput.cpp
|
|
|
|
switch_event_test.cpp
|
|
|
|
)
|
2018-01-16 19:54:11 +00:00
|
|
|
add_executable(testLibinputSwitchEvent ${testLibinputSwitchEvent_SRCS})
|
|
|
|
target_link_libraries(testLibinputSwitchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
|
|
|
|
add_test(NAME kwin-testLibinputSwitchEvent COMMAND testLibinputSwitchEvent)
|
|
|
|
ecm_mark_as_test(testLibinputSwitchEvent)
|
2017-12-27 16:57:00 +00:00
|
|
|
|
2016-06-02 05:46:09 +00:00
|
|
|
########################################################
|
|
|
|
# Test Context
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testLibinputContext_SRCS
|
2016-06-02 05:46:09 +00:00
|
|
|
../../libinput/context.cpp
|
|
|
|
../../libinput/device.cpp
|
|
|
|
../../libinput/events.cpp
|
|
|
|
../../libinput/libinput_logging.cpp
|
|
|
|
../../logind.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
context_test.cpp
|
|
|
|
mock_libinput.cpp
|
|
|
|
mock_udev.cpp
|
|
|
|
)
|
2016-06-02 05:46:09 +00:00
|
|
|
add_executable(testLibinputContext ${testLibinputContext_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testLibinputContext
|
2016-06-02 05:46:09 +00:00
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Test
|
|
|
|
Qt5::Widgets
|
2019-09-18 10:31:02 +00:00
|
|
|
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::WindowSystem
|
2019-09-17 09:15:35 +00:00
|
|
|
)
|
2017-08-25 16:18:20 +00:00
|
|
|
add_test(NAME kwin-testLibinputContext COMMAND testLibinputContext)
|
2016-06-02 05:46:09 +00:00
|
|
|
ecm_mark_as_test(testLibinputContext)
|
|
|
|
|
2016-05-24 08:57:57 +00:00
|
|
|
########################################################
|
|
|
|
# Test Input Events
|
|
|
|
########################################################
|
2019-09-17 09:15:35 +00:00
|
|
|
set(testInputEvents_SRCS input_event_test.cpp mock_libinput.cpp ../../libinput/device.cpp ../../input_event.cpp)
|
2016-05-24 08:57:57 +00:00
|
|
|
add_executable(testInputEvents ${testInputEvents_SRCS})
|
2019-09-17 09:15:35 +00:00
|
|
|
target_link_libraries(testInputEvents Qt5::Test Qt5::DBus Qt5::Gui Qt5::Widgets KF5::ConfigCore)
|
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)
|