test: skip two tests when middle button is missing
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 17 Feb 2017 00:40:34 +0000 (10:40 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 20 Feb 2017 02:17:22 +0000 (12:17 +1000)
And disable middle button emulation for this test, it would mess with the test
results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test/test-pointer.c

index abc8a118597ee74633fe6d3ca5a3d19c1a916995..d4d26079ce1d30f40ae962bfab937c9bf7d68b85 100644 (file)
@@ -952,6 +952,11 @@ START_TEST(pointer_left_handed_during_click_multiple_buttons)
        struct libinput *li = dev->libinput;
        enum libinput_config_status status;
 
+       if (!libinput_device_pointer_has_button(d, BTN_MIDDLE))
+               return;
+
+       litest_disable_middleemu(dev);
+
        litest_drain_events(li);
        litest_button_click(dev, BTN_LEFT, 1);
        libinput_dispatch(li);
@@ -1046,6 +1051,11 @@ START_TEST(pointer_scroll_button_no_event_before_timeout)
        struct libinput *li = device->libinput;
        int i;
 
+       if (!libinput_device_pointer_has_button(device->libinput_device,
+                                               BTN_MIDDLE))
+               return;
+
+       litest_disable_middleemu(device);
        disable_button_scrolling(device);
 
        libinput_device_config_scroll_set_method(device->libinput_device,