diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-07-01 10:17:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-07-09 11:29:06 +1000 |
commit | 4e3944375779e7fb0fc960d6079d186b09540fca (patch) | |
tree | 397dead28362b36dfd297041c104f6ebbe797a29 /udev | |
parent | cc59c8986f5d561c40c9edf746403cc69da66913 (diff) |
udev: make sure the udev callout path is valid for a test run
udev requires callout binaries to sit in /lib/udev or otherwise provide an
absolute path. The test suite should work without installing everything first,
so create two rule files - one to install, one with the path to the
$builddir/test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'udev')
-rw-r--r-- | udev/.gitignore | 1 | ||||
-rw-r--r-- | udev/80-libinput-device-groups.rules.in (renamed from udev/80-libinput-device-groups.rules) | 2 | ||||
-rw-r--r-- | udev/90-libinput-model-quirks.rules.in (renamed from udev/90-libinput-model-quirks.rules) | 0 | ||||
-rw-r--r-- | udev/Makefile.am | 12 |
4 files changed, 14 insertions, 1 deletions
diff --git a/udev/.gitignore b/udev/.gitignore index d8e1456b..72c77a0f 100644 --- a/udev/.gitignore +++ b/udev/.gitignore @@ -1 +1,2 @@ libinput-device-group +*.rules diff --git a/udev/80-libinput-device-groups.rules b/udev/80-libinput-device-groups.rules.in index f826bec6..c2af0ce7 100644 --- a/udev/80-libinput-device-groups.rules +++ b/udev/80-libinput-device-groups.rules.in @@ -2,7 +2,7 @@ ACTION!="add|change", GOTO="libinput_device_group_end" KERNEL!="event[0-9]*", GOTO="libinput_device_group_end" ATTRS{phys}=="?*", \ - PROGRAM="libinput-device-group %S%p", \ + PROGRAM="@UDEV_TEST_PATH@libinput-device-group %S%p", \ ENV{LIBINPUT_DEVICE_GROUP}="%c" LABEL="libinput_device_group_end" diff --git a/udev/90-libinput-model-quirks.rules b/udev/90-libinput-model-quirks.rules.in index 43674f55..43674f55 100644 --- a/udev/90-libinput-model-quirks.rules +++ b/udev/90-libinput-model-quirks.rules.in diff --git a/udev/Makefile.am b/udev/Makefile.am index 7d19809d..e5cf95c4 100644 --- a/udev/Makefile.am +++ b/udev/Makefile.am @@ -1,6 +1,10 @@ udevdir=$(UDEV_DIR) udev_PROGRAMS = libinput-device-group +litest_rules = 80-libinput-device-groups-litest.rules \ + 90-libinput-model-quirks-litest.rules +udev_SCRIPTS = $(litest_rules) + libinput_device_group_SOURCES = libinput-device-group.c libinput_device_group_CFLAGS = $(LIBUDEV_CFLAGS) $(GCC_CFLAGS) libinput_device_group_LDADD = $(LIBUDEV_LIBS) @@ -13,3 +17,11 @@ dist_udev_rules_DATA = \ udev_hwdbdir=$(UDEV_DIR)/hwdb.d dist_udev_hwdb_DATA = \ 90-libinput-model-quirks.hwdb + +%-litest.rules: %.rules.in + $(SED) -e "s|\@UDEV_TEST_PATH\@|$(abs_builddir)/|" < $^ > $@ + +CLEANFILES = $(litest_rules) +DISTCLEANFILES = \ + 80-libinput-device-groups.rules \ + 90-libinput-model-quirks.rules |