mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 11:19:14 +02:00
test: move the quirks context init into litest_run
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1067>
This commit is contained in:
parent
41c08f0816
commit
9928de7fa3
1 changed files with 13 additions and 12 deletions
|
|
@ -1027,19 +1027,8 @@ litest_run_suite(struct list *suites, int njobs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ntests > 0) {
|
if (ntests > 0)
|
||||||
const char *data_path = getenv("LIBINPUT_QUIRKS_DIR");
|
|
||||||
if (!data_path)
|
|
||||||
data_path = LIBINPUT_QUIRKS_DIR;
|
|
||||||
|
|
||||||
quirks_context = quirks_init_subsystem(data_path,
|
|
||||||
NULL,
|
|
||||||
quirk_log_handler,
|
|
||||||
NULL,
|
|
||||||
QLOG_LIBINPUT_LOGGING);
|
|
||||||
result = litest_runner_run_tests(runner);
|
result = litest_runner_run_tests(runner);
|
||||||
quirks_context_unref(quirks_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
litest_runner_destroy(runner);
|
litest_runner_destroy(runner);
|
||||||
|
|
||||||
|
|
@ -1121,8 +1110,20 @@ litest_run(struct list *suites)
|
||||||
|
|
||||||
inhibit_lock_fd = inhibit();
|
inhibit_lock_fd = inhibit();
|
||||||
|
|
||||||
|
const char *data_path = getenv("LIBINPUT_QUIRKS_DIR");
|
||||||
|
if (!data_path)
|
||||||
|
data_path = LIBINPUT_QUIRKS_DIR;
|
||||||
|
|
||||||
|
quirks_context = quirks_init_subsystem(data_path,
|
||||||
|
NULL,
|
||||||
|
quirk_log_handler,
|
||||||
|
NULL,
|
||||||
|
QLOG_LIBINPUT_LOGGING);
|
||||||
|
|
||||||
enum litest_runner_result result = litest_run_suite(suites, jobs);
|
enum litest_runner_result result = litest_run_suite(suites, jobs);
|
||||||
|
|
||||||
|
quirks_context_unref(quirks_context);
|
||||||
|
|
||||||
close(inhibit_lock_fd);
|
close(inhibit_lock_fd);
|
||||||
|
|
||||||
litest_remove_udev_rules(&created_files_list);
|
litest_remove_udev_rules(&created_files_list);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue