diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-07-22 13:16:49 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-02 10:19:38 +1000 |
commit | 35b28b1af3a7f6b58ec93286a2ab1de7c8ecb5aa (patch) | |
tree | 1e5f14b1a75a41b69eaae691f9f84e915dd98d0c /test | |
parent | bc76bd6f77b027e6f52933da6c875a6c1d1eb187 (diff) |
test: merge all tests into a single binary
Call it a libinput-test-suite-runner, in subsequent patches we'll handle doing
parallel tests ourselves instead of relying on automake features.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 104 | ||||
-rw-r--r-- | test/device.c | 2 | ||||
-rw-r--r-- | test/gestures.c | 2 | ||||
-rw-r--r-- | test/keyboard.c | 2 | ||||
-rw-r--r-- | test/litest.c | 17 | ||||
-rw-r--r-- | test/litest.h | 20 | ||||
-rw-r--r-- | test/log.c | 2 | ||||
-rw-r--r-- | test/misc.c | 2 | ||||
-rw-r--r-- | test/pad.c | 2 | ||||
-rw-r--r-- | test/path.c | 2 | ||||
-rw-r--r-- | test/pointer.c | 2 | ||||
-rw-r--r-- | test/tablet.c | 2 | ||||
-rw-r--r-- | test/touch.c | 2 | ||||
-rw-r--r-- | test/touchpad-buttons.c | 2 | ||||
-rw-r--r-- | test/touchpad-tap.c | 2 | ||||
-rw-r--r-- | test/touchpad.c | 2 | ||||
-rw-r--r-- | test/trackball.c | 2 | ||||
-rw-r--r-- | test/trackpoint.c | 2 | ||||
-rw-r--r-- | test/udev.c | 2 |
19 files changed, 71 insertions, 102 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index fda0c5d..32e379a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -77,24 +77,8 @@ liblitest_la_LIBADD += $(LIBUNWIND_LIBS) -ldl liblitest_la_CFLAGS += $(LIBUNWIND_CFLAGS) endif -run_tests = \ - test-touchpad \ - test-touchpad-tap \ - test-touchpad-buttons \ - test-pad \ - test-tablet \ - test-device \ - test-gestures \ - test-pointer \ - test-touch \ - test-trackball \ - test-trackpoint \ - test-udev \ - test-path \ - test-log \ - test-misc \ - test-keyboard \ - test-litest-selftest +run_tests = libinput-test-suite-runner \ + test-litest-selftest build_tests = \ test-build-cxx \ @@ -108,70 +92,26 @@ TESTS = $(run_tests) symbols-leak-test .NOTPARALLEL: -test_udev_SOURCES = udev.c -test_udev_LDADD = $(TEST_LIBS) -test_udev_LDFLAGS = -no-install - -test_path_SOURCES = path.c -test_path_LDADD = $(TEST_LIBS) -test_path_LDFLAGS = -no-install - -test_pointer_SOURCES = pointer.c -test_pointer_LDADD = $(TEST_LIBS) -test_pointer_LDFLAGS = -no-install - -test_touch_SOURCES = touch.c -test_touch_LDADD = $(TEST_LIBS) -test_touch_LDFLAGS = -no-install - -test_log_SOURCES = log.c -test_log_LDADD = $(TEST_LIBS) -test_log_LDFLAGS = -no-install - -test_tablet_SOURCES = tablet.c -test_tablet_LDADD = $(TEST_LIBS) -test_tablet_LDFLAGS = -static - -test_pad_SOURCES = pad.c -test_pad_LDADD = $(TEST_LIBS) -test_pad_LDFLAGS = -static - -test_touchpad_SOURCES = touchpad.c -test_touchpad_LDADD = $(TEST_LIBS) -test_touchpad_LDFLAGS = -no-install - -test_touchpad_tap_SOURCES = touchpad-tap.c -test_touchpad_tap_LDADD = $(TEST_LIBS) -test_touchpad_tap_LDFLAGS = -no-install - -test_touchpad_buttons_SOURCES = touchpad-buttons.c -test_touchpad_buttons_LDADD = $(TEST_LIBS) -test_touchpad_buttons_LDFLAGS = -no-install - -test_trackpoint_SOURCES = trackpoint.c -test_trackpoint_LDADD = $(TEST_LIBS) -test_trackpoint_LDFLAGS = -no-install - -test_trackball_SOURCES = trackball.c -test_trackball_LDADD = $(TEST_LIBS) -test_trackball_LDFLAGS = -no-install - -test_misc_SOURCES = misc.c -test_misc_CFLAGS= $(AM_CFLAGS) -DLIBINPUT_LT_VERSION="\"$(LIBINPUT_LT_VERSION)\"" -test_misc_LDADD = $(TEST_LIBS) -test_misc_LDFLAGS = -no-install - -test_keyboard_SOURCES = keyboard.c -test_keyboard_LDADD = $(TEST_LIBS) -test_keyboard_LDFLAGS = -no-install - -test_device_SOURCES = device.c -test_device_LDADD = $(TEST_LIBS) -test_device_LDFLAGS = -no-install - -test_gestures_SOURCES = gestures.c -test_gestures_LDADD = $(TEST_LIBS) -test_gestures_LDFLAGS = -no-install +libinput_test_suite_runner_SOURCES = udev.c \ + path.c \ + pointer.c \ + touch.c \ + log.c \ + tablet.c \ + pad.c \ + touchpad.c \ + touchpad-tap.c \ + touchpad-buttons.c \ + trackpoint.c \ + trackball.c \ + misc.c \ + keyboard.c \ + device.c \ + gestures.c + +libinput_test_suite_runner_CFLAGS = $(AM_CFLAGS) -DLIBINPUT_LT_VERSION="\"$(LIBINPUT_LT_VERSION)\"" +libinput_test_suite_runner_LDADD = $(TEST_LIBS) +libinput_test_suite_runner_LDFLAGS = -no-install test_litest_selftest_SOURCES = litest-selftest.c litest.c litest-int.h litest.h test_litest_selftest_CFLAGS = -DLITEST_DISABLE_BACKTRACE_LOGGING -DLITEST_NO_MAIN $(liblitest_la_CFLAGS) diff --git a/test/device.c b/test/device.c index 809d8cf..01f794f 100644 --- a/test/device.c +++ b/test/device.c @@ -1347,7 +1347,7 @@ START_TEST(device_quirks_apple_magicmouse) END_TEST void -litest_setup_tests(void) +litest_setup_tests_device(void) { struct range abs_range = { 0, ABS_MISC }; struct range abs_mt_range = { ABS_MT_SLOT + 1, ABS_CNT }; diff --git a/test/gestures.c b/test/gestures.c index fa280a4..0b132c3 100644 --- a/test/gestures.c +++ b/test/gestures.c @@ -1215,7 +1215,7 @@ START_TEST(gestures_3fg_buttonarea_scroll_btntool) END_TEST void -litest_setup_tests(void) +litest_setup_tests_gestures(void) { /* N, NE, ... */ struct range cardinals = { 0, 8 }; diff --git a/test/keyboard.c b/test/keyboard.c index f3aa9df..780506a 100644 --- a/test/keyboard.c +++ b/test/keyboard.c @@ -379,7 +379,7 @@ START_TEST(keyboard_no_buttons) END_TEST void -litest_setup_tests(void) +litest_setup_tests_keyboard(void) { litest_add_no_device("keyboard:seat key count", keyboard_seat_key_count); litest_add_no_device("keyboard:key counting", keyboard_ignore_no_pressed_release); diff --git a/test/litest.c b/test/litest.c index 3875dd0..2187901 100644 --- a/test/litest.c +++ b/test/litest.c @@ -3143,7 +3143,22 @@ main(int argc, char **argv) if (mode == LITEST_MODE_ERROR) return EXIT_FAILURE; - litest_setup_tests(); + litest_setup_tests_udev(); + litest_setup_tests_path(); + litest_setup_tests_pointer(); + litest_setup_tests_touch(); + litest_setup_tests_log(); + litest_setup_tests_tablet(); + litest_setup_tests_pad(); + litest_setup_tests_touchpad(); + litest_setup_tests_touchpad_tap(); + litest_setup_tests_touchpad_buttons(); + litest_setup_tests_trackpoint(); + litest_setup_tests_trackball(); + litest_setup_tests_misc(); + litest_setup_tests_keyboard(); + litest_setup_tests_device(); + litest_setup_tests_gestures(); if (mode == LITEST_MODE_LIST) { litest_list_tests(&all_tests); diff --git a/test/litest.h b/test/litest.h index bf50e8c..2ada8f6 100644 --- a/test/litest.h +++ b/test/litest.h @@ -35,6 +35,23 @@ #include <libinput.h> #include <math.h> +extern void litest_setup_tests_udev(void); +extern void litest_setup_tests_path(void); +extern void litest_setup_tests_pointer(void); +extern void litest_setup_tests_touch(void); +extern void litest_setup_tests_log(void); +extern void litest_setup_tests_tablet(void); +extern void litest_setup_tests_pad(void); +extern void litest_setup_tests_touchpad(void); +extern void litest_setup_tests_touchpad_tap(void); +extern void litest_setup_tests_touchpad_buttons(void); +extern void litest_setup_tests_trackpoint(void); +extern void litest_setup_tests_trackball(void); +extern void litest_setup_tests_misc(void); +extern void litest_setup_tests_keyboard(void); +extern void litest_setup_tests_device(void); +extern void litest_setup_tests_gestures(void); + void litest_fail_condition(const char *file, int line, @@ -334,9 +351,6 @@ _litest_add_ranged_no_device(const char *name, void *func, const struct range *range); -extern void -litest_setup_tests(void); - struct litest_device * litest_create_device(enum litest_device_type which); @@ -141,7 +141,7 @@ START_TEST(log_priority) END_TEST void -litest_setup_tests(void) +litest_setup_tests_log(void) { litest_add_no_device("log:defaults", log_default_priority); litest_add_no_device("log:logging", log_handler_invoked); diff --git a/test/misc.c b/test/misc.c index dec4ee4..791ebc3 100644 --- a/test/misc.c +++ b/test/misc.c @@ -935,7 +935,7 @@ START_TEST(library_version) END_TEST void -litest_setup_tests(void) +litest_setup_tests_misc(void) { litest_add_no_device("events:conversion", event_conversion_device_notify); litest_add_for_device("events:conversion", event_conversion_pointer, LITEST_MOUSE); @@ -632,7 +632,7 @@ START_TEST(pad_mode_group_has_no_toggle) END_TEST void -litest_setup_tests(void) +litest_setup_tests_pad(void) { litest_add("pad:cap", pad_cap, LITEST_TABLET_PAD, LITEST_ANY); litest_add("pad:cap", pad_no_cap, LITEST_ANY, LITEST_TABLET_PAD); diff --git a/test/path.c b/test/path.c index 21b5fa0..221c175 100644 --- a/test/path.c +++ b/test/path.c @@ -938,7 +938,7 @@ START_TEST(path_seat_recycle) END_TEST void -litest_setup_tests(void) +litest_setup_tests_path(void) { litest_add_no_device("path:create", path_create_NULL); litest_add_no_device("path:create", path_create_invalid); diff --git a/test/pointer.c b/test/pointer.c index f8651a7..ac67ab9 100644 --- a/test/pointer.c +++ b/test/pointer.c @@ -1723,7 +1723,7 @@ START_TEST(pointer_time_usec) END_TEST void -litest_setup_tests(void) +litest_setup_tests_pointer(void) { struct range axis_range = {ABS_X, ABS_Y + 1}; struct range compass = {0, 7}; /* cardinal directions */ diff --git a/test/tablet.c b/test/tablet.c index 04eb307..b91d5cb 100644 --- a/test/tablet.c +++ b/test/tablet.c @@ -3676,7 +3676,7 @@ START_TEST(relative_calibration) END_TEST void -litest_setup_tests(void) +litest_setup_tests_tablet(void) { litest_add("tablet:tool", tool_ref, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY); litest_add_no_device("tablet:tool", tool_capabilities); diff --git a/test/touch.c b/test/touch.c index cc1cfb2..ac2f29f 100644 --- a/test/touch.c +++ b/test/touch.c @@ -720,7 +720,7 @@ START_TEST(touch_fuzz) END_TEST void -litest_setup_tests(void) +litest_setup_tests_touch(void) { struct range axes = { ABS_X, ABS_Y + 1}; diff --git a/test/touchpad-buttons.c b/test/touchpad-buttons.c index d72278b..2beb637 100644 --- a/test/touchpad-buttons.c +++ b/test/touchpad-buttons.c @@ -1805,7 +1805,7 @@ START_TEST(clickpad_middleemulation_click_disable_while_down) END_TEST void -litest_setup_tests(void) +litest_setup_tests_touchpad_buttons(void) { litest_add("touchpad:clickfinger", touchpad_1fg_clickfinger, LITEST_CLICKPAD, LITEST_ANY); litest_add("touchpad:clickfinger", touchpad_1fg_clickfinger_no_touch, LITEST_CLICKPAD, LITEST_ANY); diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c index 8383aa9..d09189f 100644 --- a/test/touchpad-tap.c +++ b/test/touchpad-tap.c @@ -1959,7 +1959,7 @@ START_TEST(touchpad_drag_lock_default_unavailable) END_TEST void -litest_setup_tests(void) +litest_setup_tests_touchpad_tap(void) { struct range multitap_range = {3, 8}; diff --git a/test/touchpad.c b/test/touchpad.c index 57e4712..fe685c1 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -4136,7 +4136,7 @@ START_TEST(touchpad_jump_finger_motion) END_TEST void -litest_setup_tests(void) +litest_setup_tests_touchpad(void) { struct range axis_range = {ABS_X, ABS_Y + 1}; diff --git a/test/trackball.c b/test/trackball.c index d3238cf..28639ad 100644 --- a/test/trackball.c +++ b/test/trackball.c @@ -260,7 +260,7 @@ START_TEST(trackball_rotation_accel) END_TEST void -litest_setup_tests(void) +litest_setup_tests_trackball(void) { litest_add("trackball:rotation", trackball_rotation_config_defaults, LITEST_TRACKBALL, LITEST_ANY); litest_add("trackball:rotation", trackball_rotation_config_invalid_range, LITEST_TRACKBALL, LITEST_ANY); diff --git a/test/trackpoint.c b/test/trackpoint.c index 4098f6f..a9d01c4 100644 --- a/test/trackpoint.c +++ b/test/trackpoint.c @@ -281,7 +281,7 @@ START_TEST(trackpoint_topsoftbuttons_left_handed_both) END_TEST void -litest_setup_tests(void) +litest_setup_tests_trackpoint(void) { litest_add("trackpoint:middlebutton", trackpoint_middlebutton, LITEST_POINTINGSTICK, LITEST_ANY); litest_add("trackpoint:middlebutton", trackpoint_middlebutton_noscroll, LITEST_POINTINGSTICK, LITEST_ANY); diff --git a/test/udev.c b/test/udev.c index 7c294c5..5a74436 100644 --- a/test/udev.c +++ b/test/udev.c @@ -507,7 +507,7 @@ START_TEST(udev_seat_recycle) END_TEST void -litest_setup_tests(void) +litest_setup_tests_udev(void) { litest_add_no_device("udev:create", udev_create_NULL); litest_add_no_device("udev:create", udev_create_seat0); |