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.
This commit is contained in:
Peter Hutterer 2018-05-18 14:48:15 +10:00
parent 6adb336829
commit 187e33f5da

View file

@ -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,
)