mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 14:38:19 +02:00
test: Make udev path variables more explicitly named
This is to make room for more types of rules files. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
aa5f55149b
commit
5cb1cb47f7
2 changed files with 12 additions and 10 deletions
|
|
@ -45,8 +45,8 @@ liblitest_la_SOURCES = \
|
||||||
litest.c
|
litest.c
|
||||||
liblitest_la_LIBADD = $(top_builddir)/src/libinput-util.la
|
liblitest_la_LIBADD = $(top_builddir)/src/libinput-util.la
|
||||||
liblitest_la_CFLAGS = $(AM_CFLAGS) \
|
liblitest_la_CFLAGS = $(AM_CFLAGS) \
|
||||||
-DLIBINPUT_UDEV_RULES_FILE="\"$(abs_top_builddir)/udev/90-libinput-model-quirks-litest.rules\"" \
|
-DLIBINPUT_MODEL_QUIRKS_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_HWDB_FILE="\"$(abs_top_srcdir)/udev/90-libinput-model-quirks.hwdb\""
|
||||||
if HAVE_LIBUNWIND
|
if HAVE_LIBUNWIND
|
||||||
liblitest_la_LIBADD += $(LIBUNWIND_LIBS) -ldl
|
liblitest_la_LIBADD += $(LIBUNWIND_LIBS) -ldl
|
||||||
liblitest_la_CFLAGS += $(LIBUNWIND_CFLAGS)
|
liblitest_la_CFLAGS += $(LIBUNWIND_CFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,10 @@
|
||||||
#define UDEV_RULES_D "/run/udev/rules.d"
|
#define UDEV_RULES_D "/run/udev/rules.d"
|
||||||
#define UDEV_RULE_PREFIX "99-litest-"
|
#define UDEV_RULE_PREFIX "99-litest-"
|
||||||
#define UDEV_HWDB_D "/etc/udev/hwdb.d"
|
#define UDEV_HWDB_D "/etc/udev/hwdb.d"
|
||||||
#define UDEV_COMMON_RULE_FILE UDEV_RULES_D "/91-litest-model-quirks-REMOVEME.rules"
|
#define UDEV_MODEL_QUIRKS_RULE_FILE UDEV_RULES_D \
|
||||||
#define UDEV_COMMON_HWDB_FILE UDEV_HWDB_D "/91-litest-model-quirks-REMOVEME.hwdb"
|
"/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 in_debugger = -1;
|
||||||
static int verbose = 0;
|
static int verbose = 0;
|
||||||
|
|
@ -947,19 +949,19 @@ litest_install_model_quirks(void)
|
||||||
"# running, remove this file and update your hwdb: \n"
|
"# running, remove this file and update your hwdb: \n"
|
||||||
"# sudo udevadm hwdb --update\n"
|
"# sudo udevadm hwdb --update\n"
|
||||||
"#################################################################\n\n";
|
"#################################################################\n\n";
|
||||||
litest_copy_file(UDEV_COMMON_RULE_FILE,
|
litest_copy_file(UDEV_MODEL_QUIRKS_RULE_FILE,
|
||||||
LIBINPUT_UDEV_RULES_FILE,
|
LIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE,
|
||||||
warning);
|
warning);
|
||||||
litest_copy_file(UDEV_COMMON_HWDB_FILE,
|
litest_copy_file(UDEV_MODEL_QUIRKS_HWDB_FILE,
|
||||||
LIBINPUT_UDEV_HWDB_FILE,
|
LIBINPUT_MODEL_QUIRKS_UDEV_HWDB_FILE,
|
||||||
warning);
|
warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
litest_remove_model_quirks(void)
|
litest_remove_model_quirks(void)
|
||||||
{
|
{
|
||||||
unlink(UDEV_COMMON_RULE_FILE);
|
unlink(UDEV_MODEL_QUIRKS_RULE_FILE);
|
||||||
unlink(UDEV_COMMON_HWDB_FILE);
|
unlink(UDEV_MODEL_QUIRKS_HWDB_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue