From 9e00d09b303e0f2ce7aec28723868646dd9637f7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Oct 2024 09:30:12 +1000 Subject: [PATCH] test: split the tablet left-handed tests out into a separate collection These aren't complicated but there's a lot of them so let's run them separately to make the overall tablet test shorter. Part-of: --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ .gitlab-ci/config.yml | 3 +++ meson.build | 1 + test/test-tablet.c | 29 +++++++++++++++++------------ 4 files changed, 47 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee87ca51..6341be74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -620,6 +620,19 @@ vm-tablet-no-libwacom: variables: MESON_ARGS: '-Dlibwacom=false' +vm-tablet_left_handed: + extends: + - .fedora:40@test-suite-vm + variables: + SUITE_NAMES: 'tablet_left_handed' + +vm-tablet_left_handed-no-libwacom: + extends: + - vm-tablet_left_handed + stage: test-suite-no-libwacom + variables: + MESON_ARGS: '-Dlibwacom=false' + vm-gestures: extends: - .fedora:40@test-suite-vm @@ -758,6 +771,18 @@ vm-valgrind-tablet: rules: - if: $GITLAB_USER_LOGIN != "marge-bot" +vm-valgrind-tablet_left_handed: + stage: valgrind + extends: + - vm-tablet_left_handed + variables: + MESON_TEST_ARGS: '--setup=valgrind' + LITEST_JOBS: 2 + retry: + max: 2 + rules: + - if: $GITLAB_USER_LOGIN != "marge-bot" + vm-valgrind-gestures: stage: valgrind extends: @@ -950,6 +975,7 @@ check-test-suites: libinput-test-suite-touchpad_tap_palm libinput-test-suite-touchpad_buttons libinput-test-suite-tablet + libinput-test-suite-tablet_left_handed libinput-test-suite-gestures libinput-test-suite-path libinput-test-suite-udev diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 10aaa236..b2db5134 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -187,6 +187,9 @@ test_suites: - name: tablet suites: - tablet + - name: tablet_left_handed + suites: + - tablet_left_handed - name: gestures suites: - gestures diff --git a/meson.build b/meson.build index c4df02e1..7dc2bd75 100644 --- a/meson.build +++ b/meson.build @@ -948,6 +948,7 @@ if get_option('tests') 'quirks', 'switch', 'tablet', + 'tablet_left_handed', 'totem', 'touch', 'touchpad', diff --git a/test/test-tablet.c b/test/test-tablet.c index b22b32d8..a9f22f18 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -6564,7 +6564,6 @@ TEST_COLLECTION(tablet) { struct range with_timeout = { 0, 2 }; struct range xyaxes = { ABS_X, ABS_Y + 1 }; - struct range lh_transitions = {0, 16}; /* 2 bits for in, 2 bits for out */ struct range tilt_cases = {TILT_MINIMUM, TILT_MAXIMUM + 1}; litest_add(tool_ref, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY); @@ -6628,11 +6627,6 @@ TEST_COLLECTION(tablet) litest_add(tilt_x, LITEST_TABLET|LITEST_TILT, LITEST_ANY); litest_add(tilt_y, LITEST_TABLET|LITEST_TILT, LITEST_ANY); litest_add_ranged(tilt_fixed_points, LITEST_TABLET|LITEST_TILT, LITEST_ANY, &tilt_cases); - litest_add_for_device(left_handed, LITEST_WACOM_INTUOS); - litest_add_for_device(left_handed_tilt, LITEST_WACOM_INTUOS); - litest_add_for_device(left_handed_mouse_rotation, LITEST_WACOM_INTUOS); - litest_add_for_device(left_handed_artpen_rotation, LITEST_WACOM_INTUOS); - litest_add_for_device(no_left_handed, LITEST_WACOM_CINTIQ); litest_add(pad_buttons_ignored, LITEST_TABLET, LITEST_TOTEM); litest_add_for_device(stylus_buttons, LITEST_WACOM_CINTIQ_PRO16_PEN); litest_add(mouse_tool, LITEST_TABLET | LITEST_TOOL_MOUSE, LITEST_ANY); @@ -6692,16 +6686,27 @@ TEST_COLLECTION(tablet) litest_add(touch_arbitration_remove_after, LITEST_TABLET | LITEST_DIRECT, LITEST_ANY); litest_add(touch_arbitration_swap_device, LITEST_TABLET, LITEST_ANY); + litest_add_for_device(huion_static_btn_tool_pen, LITEST_HUION_TABLET); + litest_add_for_device(huion_static_btn_tool_pen_no_timeout_during_usage, LITEST_HUION_TABLET); + litest_add_ranged_for_device(huion_static_btn_tool_pen_disable_quirk_on_prox_out, LITEST_HUION_TABLET, &with_timeout); + + litest_add_for_device(tablet_smoothing, LITEST_WACOM_HID4800_PEN); +} + +TEST_COLLECTION(tablet_left_handed) +{ + struct range lh_transitions = {0, 16}; /* 2 bits for in, 2 bits for out */ + + litest_add_for_device(left_handed, LITEST_WACOM_INTUOS); + litest_add_for_device(left_handed_tilt, LITEST_WACOM_INTUOS); + litest_add_for_device(left_handed_mouse_rotation, LITEST_WACOM_INTUOS); + litest_add_for_device(left_handed_artpen_rotation, LITEST_WACOM_INTUOS); + litest_add_for_device(no_left_handed, LITEST_WACOM_CINTIQ); + litest_add_ranged(tablet_rotation_left_handed, LITEST_TABLET, LITEST_ANY, &lh_transitions); litest_add_ranged(tablet_rotation_left_handed_configuration, LITEST_TABLET, LITEST_ANY, &lh_transitions); litest_add_ranged(tablet_rotation_left_handed_while_in_prox, LITEST_TABLET, LITEST_ANY, &lh_transitions); litest_add_ranged(tablet_rotation_left_handed_while_touch_down, LITEST_TABLET, LITEST_ANY, &lh_transitions); litest_add_ranged(tablet_rotation_left_handed_add_touchpad, LITEST_TABLET, LITEST_ANY, &lh_transitions); litest_add_ranged(tablet_rotation_left_handed_add_tablet, LITEST_TOUCHPAD, LITEST_ANY, &lh_transitions); - - litest_add_for_device(huion_static_btn_tool_pen, LITEST_HUION_TABLET); - litest_add_for_device(huion_static_btn_tool_pen_no_timeout_during_usage, LITEST_HUION_TABLET); - litest_add_ranged_for_device(huion_static_btn_tool_pen_disable_quirk_on_prox_out, LITEST_HUION_TABLET, &with_timeout); - - litest_add_for_device(tablet_smoothing, LITEST_WACOM_HID4800_PEN); } -- 2.34.1