[PATCH libinput 4/7] test: enable tapping before verifying correct tap events

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 3 20:18:34 PST 2015


These tests make sure we don't get tapping events in certain situations
(finger movement, timeouts, ...). Tapping must be enabled for that to be a
valid test.

The tests can't work on semi-mt devices because we can't end slots
independently. Disable the tests there.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/touchpad.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/test/touchpad.c b/test/touchpad.c
index 246d07a..35178de 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -508,6 +508,8 @@ START_TEST(touchpad_no_2fg_tap_after_move)
 	struct litest_device *dev = litest_current_device();
 	struct libinput *li = dev->libinput;
 
+	libinput_device_config_tap_set_enabled(dev->libinput_device,
+					       LIBINPUT_CONFIG_TAP_ENABLED);
 	litest_drain_events(dev->libinput);
 
 	/* one finger down, move past threshold,
@@ -530,6 +532,8 @@ START_TEST(touchpad_no_2fg_tap_after_timeout)
 	struct litest_device *dev = litest_current_device();
 	struct libinput *li = dev->libinput;
 
+	libinput_device_config_tap_set_enabled(dev->libinput_device,
+					       LIBINPUT_CONFIG_TAP_ENABLED);
 	litest_drain_events(dev->libinput);
 
 	/* one finger down, wait past tap timeout,
@@ -555,6 +559,9 @@ START_TEST(touchpad_no_first_fg_tap_after_move)
 	struct libinput *li = dev->libinput;
 	struct libinput_event *event;
 
+	libinput_device_config_tap_set_enabled(dev->libinput_device,
+					       LIBINPUT_CONFIG_TAP_ENABLED);
+
 	litest_drain_events(dev->libinput);
 
 	/* one finger down, second finger down,
@@ -3326,8 +3333,8 @@ int main(int argc, char **argv) {
 	litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD);
 
 	litest_add("touchpad:tap", touchpad_2fg_tap_click_apple, LITEST_APPLE_CLICKPAD, LITEST_ANY);
-	litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
-	litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
+	litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT);
+	litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT);
 	litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
 	litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
 	litest_add("touchpad:tap", touchpad_3fg_tap_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
-- 
2.1.0



More information about the wayland-devel mailing list