test: split the tablet left-handed tests out into a separate collection
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Oct 2024 23:30:12 +0000 (09:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 18 Oct 2024 00:49:47 +0000 (10:49 +1000)
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: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1065>

.gitlab-ci.yml
.gitlab-ci/config.yml
meson.build
test/test-tablet.c

index ee87ca517528ea165e80bbda62767ffa71568860..6341be74c1c1491845c8a6cd3ce421e1d83ee7e0 100644 (file)
@@ -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
index 10aaa236ad23298523ed421ddb5c336eb3b7e161..b2db513461a7693986e8b5d07d62540e7213eb19 100644 (file)
@@ -187,6 +187,9 @@ test_suites:
   - name: tablet
     suites:
       - tablet
+  - name: tablet_left_handed
+    suites:
+      - tablet_left_handed
   - name: gestures
     suites:
       - gestures
index c4df02e1385a0408041bcd5521f90aa5c813f442..7dc2bd75200dcfed2d43c40b81443de5a1dfdafc 100644 (file)
@@ -948,6 +948,7 @@ if get_option('tests')
                'quirks',
                'switch',
                'tablet',
+               'tablet_left_handed',
                'totem',
                'touch',
                'touchpad',
index b22b32d85a15784313354d89a778d6c971196be0..a9f22f180211deb0c1d695363b4272b58ee79da4 100644 (file)
@@ -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);
 }