Ignore test devices for libinput contexts not run from the test suite
authorJonas Ådahl <jadahl@gmail.com>
Mon, 27 Jul 2015 08:08:04 +0000 (16:08 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Tue, 28 Jul 2015 09:42:32 +0000 (17:42 +0800)
commit091206c907c7f7e31e2f4ce92346783131e7b7d8
treea01f01b42967c0c277dfb1dab184201318b80513
parent5cb1cb47f7313a4464f8a94b3fbfe90fe80488eb
Ignore test devices for libinput contexts not run from the test suite

Add a LIBINPUT_TEST_DEVICE udev parameter to test devices created by
the test suite. When an application tries to add such a device to the
path backend or when the udev backend discovers such a device, it will
be ignored. Only the context when run via the test suite will actually
handle these devices.

Doing this will enable a user to run the libinput test suite on a system
running libinput without having the test suite devices interfering with
the actual system.

Note that X.org users running an input device driver that is not the
libinput X input driver will still need to manually configure the X
server to ignore such devices (see test/50-litest.conf).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
src/libinput-private.h
src/libinput.c
src/path.c
src/udev-seat.c
test/Makefile.am
test/litest.c
udev/.gitignore
udev/80-libinput-test-device.rules [new file with mode: 0644]