Commit 5cb1cb47 authored by Jonas Ådahl's avatar Jonas Ådahl

test: Make udev path variables more explicitly named

This is to make room for more types of rules files.
Signed-off-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent aa5f5514
......@@ -45,8 +45,8 @@ liblitest_la_SOURCES = \
litest.c
liblitest_la_LIBADD = $(top_builddir)/src/libinput-util.la
liblitest_la_CFLAGS = $(AM_CFLAGS) \
-DLIBINPUT_UDEV_RULES_FILE="\"$(abs_top_builddir)/udev/90-libinput-model-quirks-litest.rules\"" \
-DLIBINPUT_UDEV_HWDB_FILE="\"$(abs_top_srcdir)/udev/90-libinput-model-quirks.hwdb\""
-DLIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE="\"$(abs_top_builddir)/udev/90-libinput-model-quirks-litest.rules\"" \
-DLIBINPUT_MODEL_QUIRKS_UDEV_HWDB_FILE="\"$(abs_top_srcdir)/udev/90-libinput-model-quirks.hwdb\""
if HAVE_LIBUNWIND
liblitest_la_LIBADD += $(LIBUNWIND_LIBS) -ldl
liblitest_la_CFLAGS += $(LIBUNWIND_CFLAGS)
......
......@@ -53,8 +53,10 @@
#define UDEV_RULES_D "/run/udev/rules.d"
#define UDEV_RULE_PREFIX "99-litest-"
#define UDEV_HWDB_D "/etc/udev/hwdb.d"
#define UDEV_COMMON_RULE_FILE UDEV_RULES_D "/91-litest-model-quirks-REMOVEME.rules"
#define UDEV_COMMON_HWDB_FILE UDEV_HWDB_D "/91-litest-model-quirks-REMOVEME.hwdb"
#define UDEV_MODEL_QUIRKS_RULE_FILE UDEV_RULES_D \
"/91-litest-model-quirks-REMOVEME.rules"
#define UDEV_MODEL_QUIRKS_HWDB_FILE UDEV_HWDB_D \
"/91-litest-model-quirks-REMOVEME.hwdb"
static int in_debugger = -1;
static int verbose = 0;
......@@ -947,19 +949,19 @@ litest_install_model_quirks(void)
"# running, remove this file and update your hwdb: \n"
"# sudo udevadm hwdb --update\n"
"#################################################################\n\n";
litest_copy_file(UDEV_COMMON_RULE_FILE,
LIBINPUT_UDEV_RULES_FILE,
litest_copy_file(UDEV_MODEL_QUIRKS_RULE_FILE,
LIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE,
warning);
litest_copy_file(UDEV_COMMON_HWDB_FILE,
LIBINPUT_UDEV_HWDB_FILE,
litest_copy_file(UDEV_MODEL_QUIRKS_HWDB_FILE,
LIBINPUT_MODEL_QUIRKS_UDEV_HWDB_FILE,
warning);
}
static inline void
litest_remove_model_quirks(void)
{
unlink(UDEV_COMMON_RULE_FILE);
unlink(UDEV_COMMON_HWDB_FILE);
unlink(UDEV_MODEL_QUIRKS_RULE_FILE);
unlink(UDEV_MODEL_QUIRKS_HWDB_FILE);
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment