test: mark the magic trackpad as external in udev

This should be handled by a udev rule in systemd/hwdb but that rule doesn't
apply to virtual devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2016-12-20 07:22:27 +10:00
parent 1f5c5cf2c7
commit 5307051386

View file

@ -93,6 +93,16 @@ static int events[] = {
-1, -1
};
static const char udev_rule[] =
"ACTION==\"remove\", GOTO=\"touchpad_end\"\n"
"KERNEL!=\"event*\", GOTO=\"touchpad_end\"\n"
"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n"
"\n"
"ATTRS{name}==\"litest Apple Wireless Trackpad\","
" ENV{ID_INPUT_TOUCHPAD_INTEGRATION}=\"external\"\n"
"\n"
"LABEL=\"touchpad_end\"";
struct litest_test_device litest_magicpad_device = {
.type = LITEST_MAGIC_TRACKPAD,
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD |
@ -105,4 +115,5 @@ struct litest_test_device litest_magicpad_device = {
.id = &input_id,
.events = events,
.absinfo = absinfo,
.udev_rule = udev_rule,
};