From 566d73aa3d4248363ec9e168bcc60d9b9a3011eb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Mar 2019 11:43:13 +1000 Subject: [PATCH] test: don't install our normal rules file in installed mode When running the test-suite, don't install our rules for device groups and model quirks - they're expected to be present already. Plus, since we copy them from the meson build dir, we don't have those files available anyway. Signed-off-by: Peter Hutterer --- test/litest.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/litest.c b/test/litest.c index 666abc8..06c1cbf 100644 --- a/test/litest.c +++ b/test/litest.c @@ -75,7 +75,7 @@ static int jobs = 8; static bool in_debugger = false; static bool verbose = false; static bool run_deviceless = false; -static bool skip_quirks_install = false; +static bool use_system_rules_quirks = false; const char *filter_test = NULL; const char *filter_device = NULL; const char *filter_group = NULL; @@ -994,7 +994,7 @@ litest_run(int argc, char **argv) litest_init_udev_rules(&created_files_list); - mode = skip_quirks_install ? + mode = use_system_rules_quirks ? QUIRKS_SETUP_ONLY_DEVICE : QUIRKS_SETUP_FULL; litest_setup_quirks(&created_files_list, mode); @@ -1157,6 +1157,11 @@ litest_install_model_quirks(struct list *created_files_list) false); list_insert(created_files_list, &file->link); + /* Ony install the litest device rule when we're running as system + * test suite, we expect the others to be in place already */ + if (use_system_rules_quirks) + return; + file = litest_copy_file(UDEV_DEVICE_GROUPS_FILE, LIBINPUT_DEVICE_GROUPS_RULES_FILE, warning, @@ -3924,7 +3929,7 @@ litest_parse_argv(int argc, char **argv) * against the system as installed */ builddir = builddir_lookup(); if (!builddir) - skip_quirks_install = true; + use_system_rules_quirks = true; free(builddir); if (in_debugger) -- 2.7.4