From: Peter Hutterer Date: Wed, 16 Oct 2024 01:04:08 +0000 (+1000) Subject: test: move the rest of the custom initialization to litest_run X-Git-Tag: 1.27.0~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c68c0f593b698b372ceb2441ec28324d78472ef7;p=platform%2Fupstream%2Flibinput.git test: move the rest of the custom initialization to litest_run Part-of: --- diff --git a/test/litest.c b/test/litest.c index 9a36909c..fa9f91df 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1113,9 +1113,15 @@ restore_tty(int tty_mode) static inline enum litest_runner_result litest_run(struct list *suites) { + const struct rlimit corelimit = { 0, 0 }; int inhibit_lock_fd; int tty_mode = -1; + setenv("LIBINPUT_RUNNING_TEST_SUITE", "1", 1); + + if (setrlimit(RLIMIT_CORE, &corelimit) != 0) + perror("WARNING: Core dumps not disabled"); + list_init(&created_files_list); if (run_deviceless) { @@ -4818,7 +4824,6 @@ litest_free_test_list(struct list *tests) int main(int argc, char **argv) { - const struct rlimit corelimit = { 0, 0 }; enum litest_mode mode; int rc; const char *meson_testthreads; @@ -4857,12 +4862,6 @@ main(int argc, char **argv) if (!run_deviceless && (rc = check_device_access()) != 0) return rc; - setenv("CK_DEFAULT_TIMEOUT", "30", 0); - setenv("LIBINPUT_RUNNING_TEST_SUITE", "1", 1); - - if (setrlimit(RLIMIT_CORE, &corelimit) != 0) - perror("WARNING: Core dumps not disabled"); - enum litest_runner_result result = litest_run(&all_test_suites); litest_free_test_list(&all_test_suites);