From 442186f2387ad536f232b50c762310e6db7d7171 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 May 2018 14:48:15 +1000 Subject: [PATCH libinput 6/7] test: mark the thinkpad extrabuttons device as ID_INPUT_SWITCH This is supposed to come from systemd on a real setup, but for our test setup we want to pass the test suite even when the system itself doesn't set it. --- test/litest-device-thinkpad-extrabuttons.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/litest-device-thinkpad-extrabuttons.c b/test/litest-device-thinkpad-extrabuttons.c index 42e5886f..e9929e65 100644 --- a/test/litest-device-thinkpad-extrabuttons.c +++ b/test/litest-device-thinkpad-extrabuttons.c @@ -70,6 +70,15 @@ static int events[] = { -1, -1, }; +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"switch_end\"\n" +"KERNEL!=\"event*\", GOTO=\"switch_end\"\n" +"\n" +"ATTRS{name}==\"litest ThinkPad Extra Buttons*\",\\\n" +" ENV{ID_INPUT_SWITCH}=\"1\"\n" +"\n" +"LABEL=\"switch_end\""; + TEST_DEVICE("thinkpad-extrabuttons", .type = LITEST_THINKPAD_EXTRABUTTONS, .features = LITEST_KEYS | LITEST_SWITCH, @@ -79,4 +88,5 @@ TEST_DEVICE("thinkpad-extrabuttons", .id = &input_id, .events = events, .absinfo = NULL, + .udev_rule = udev_rule, ) -- 2.14.3