test: add a pre-calibrated flag and exclude the tests as necessary
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 11 May 2023 04:47:20 +0000 (14:47 +1000)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 4 Dec 2023 10:23:27 +0000 (19:23 +0900)
Prep work for adding a precalibrated tablet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest-device-calibrated-touchscreen.c
test/litest.h
test/test-tablet.c

index 1684648b6e7c135b4c35297843d409f57b8d3201..ef4903e276b5117270aa033fbdf30f7ffcfae54e 100644 (file)
@@ -72,7 +72,7 @@ static int events[] = {
 
 TEST_DEVICE("calibrated-touchscreen",
        .type = LITEST_CALIBRATED_TOUCHSCREEN,
-       .features = LITEST_TOUCH,
+       .features = LITEST_TOUCH|LITEST_PRECALIBRATED,
        .interface = &interface,
 
        .name = "Calibrated Touchscreen",
index f69f83beadb5bbeda45559985c026de7d10ebe72..9d968d637848639c26bb23630a7874c65ee12108 100644 (file)
@@ -366,6 +366,7 @@ enum litest_device_type {
 #define LITEST_DIRECT          bit(30)
 #define LITEST_TOTEM           bit(31)
 #define LITEST_FORCED_PROXOUT  bit(32)
+#define LITEST_PRECALIBRATED   bit(33)
 
 /* this is a semi-mt device, so we keep track of the touches that the tests
  * send and modify them so that the first touch is always slot 0 and sends
index 9a6602e6ef89a42bec28ed06b4f131deafe979c7..6b052a90fe8f3f33916643b6e910b622dff3a6f9 100644 (file)
@@ -6208,9 +6208,9 @@ TEST_COLLECTION(tablet)
        litest_add(tablet_pressure_distance_exclusive, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
 
        /* The totem doesn't need calibration */
-       litest_add(tablet_calibration_has_matrix, LITEST_TABLET, LITEST_TOTEM);
-       litest_add(tablet_calibration_set_matrix, LITEST_TABLET, LITEST_TOTEM);
-       litest_add(tablet_calibration_set_matrix_delta, LITEST_TABLET, LITEST_TOTEM);
+       litest_add(tablet_calibration_has_matrix, LITEST_TABLET, LITEST_TOTEM|LITEST_PRECALIBRATED);
+       litest_add(tablet_calibration_set_matrix, LITEST_TABLET, LITEST_TOTEM|LITEST_PRECALIBRATED);
+       litest_add(tablet_calibration_set_matrix_delta, LITEST_TABLET, LITEST_TOTEM|LITEST_PRECALIBRATED);
 
        litest_add(tablet_pressure_min_max, LITEST_TABLET, LITEST_ANY);
        litest_add_for_device(tablet_pressure_range, LITEST_WACOM_INTUOS);
@@ -6226,7 +6226,7 @@ TEST_COLLECTION(tablet)
        litest_add(relative_no_delta_prox_in, LITEST_TABLET, LITEST_ANY);
        litest_add(relative_delta, LITEST_TABLET, LITEST_ANY);
        litest_add(relative_no_delta_on_tip, LITEST_TABLET|LITEST_HOVER, LITEST_ANY);
-       litest_add(relative_calibration, LITEST_TABLET, LITEST_ANY);
+       litest_add(relative_calibration, LITEST_TABLET, LITEST_PRECALIBRATED);
 
        litest_add(touch_arbitration, LITEST_TABLET, LITEST_ANY);
        litest_add(touch_arbitration_stop_touch, LITEST_TABLET, LITEST_ANY);