diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/litest-device-apple-magicmouse.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/litest-device-apple-magicmouse.c b/test/litest-device-apple-magicmouse.c index 29d3b98..0ba84a5 100644 --- a/test/litest-device-apple-magicmouse.c +++ b/test/litest-device-apple-magicmouse.c @@ -88,6 +88,24 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; +/* Force MOUSE_DPI to the empty string. As of systemd commit f013e99e160f + * ID_BUS=bluetooth now triggers the hwdb entry for this device. This causes + * test case failures because deltas change. Detecting old vs new systemd is + * hard, and because our rules are 99-prefixed we can't set ID_BUS ourselves + * on older systemd. + * So let's go the easy way and unset MOUSE_DPI so we can continue to use + * the current tests. + */ +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"mouse_end\"\n" +"KERNEL!=\"event*\", GOTO=\"mouse_end\"\n" +"ENV{ID_INPUT_MOUSE}==\"\", GOTO=\"mouse_end\"\n" +"\n" +"ATTRS{name}==\"litest Apple Magic Mouse\"," +" ENV{MOUSE_DPI}=\"\"" +"\n" +"LABEL=\"mouse_end\""; + struct litest_test_device litest_magicmouse_device = { .type = LITEST_MAGICMOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, @@ -99,4 +117,5 @@ struct litest_test_device litest_magicmouse_device = { .id = &input_id, .events = events, .absinfo = absinfo, + .udev_rule = udev_rule, }; |