test: rename a variable to indicate suites, not tests

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1062>
This commit is contained in:
Peter Hutterer 2024-10-16 11:26:15 +10:00
parent cd957b4e79
commit d010c6a170

View file

@ -1062,7 +1062,7 @@ litest_export_xml(SRunner *sr, const char *xml_prefix)
} }
static int static int
litest_run_suite(struct list *tests, int which, int max, int error_fd) litest_run_suite(struct list *suites, int which, int max, int error_fd)
{ {
int failed = 0; int failed = 0;
SRunner *sr = NULL; SRunner *sr = NULL;
@ -1095,7 +1095,7 @@ litest_run_suite(struct list *tests, int which, int max, int error_fd)
add it to the test runner. The only benefit suites give us in add it to the test runner. The only benefit suites give us in
check is that we can filter them, but our test runner has a check is that we can filter them, but our test runner has a
--filter-group anyway. */ --filter-group anyway. */
list_for_each(s, tests, node) { list_for_each(s, suites, node) {
list_for_each(t, &s->tests, node) { list_for_each(t, &s->tests, node) {
Suite *suite; Suite *suite;
TCase *tc; TCase *tc;
@ -1223,7 +1223,7 @@ litest_fork_subtests(struct list *tests, int max_forks)
max_forks, max_forks,
pipefd[1]); pipefd[1]);
litest_free_test_list(&all_tests); litest_free_test_list(&all_test_suites);
exit(failed); exit(failed);
/* child always exits here */ /* child always exits here */
} else { } else {
@ -1306,7 +1306,7 @@ out:
} }
static inline int static inline int
litest_run(struct list *tests) litest_run(struct list *suites)
{ {
int failed = 0; int failed = 0;
int inhibit_lock_fd; int inhibit_lock_fd;
@ -1332,9 +1332,9 @@ litest_run(struct list *tests)
inhibit_lock_fd = inhibit(); inhibit_lock_fd = inhibit();
if (jobs == 1) if (jobs == 1)
failed = litest_run_suite(tests, 1, 1, STDERR_FILENO); failed = litest_run_suite(suites, 1, 1, STDERR_FILENO);
else else
failed = litest_fork_subtests(tests, jobs); failed = litest_fork_subtests(suites, jobs);
close(inhibit_lock_fd); close(inhibit_lock_fd);