Instead of exiting on the first failing test execute all tests and
report overall failure as needed.
This gives us a better overview - which do we have single failure or
multiple instances need work - and more consistent results numbers.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/246
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
int main(int argc, char *argv[]) \
{ \
const struct test *t; \
- int arg; \
+ int arg, ret = EXIT_SUCCESS; \
\
arg = test_init(__start_kmod_tests, __stop_kmod_tests, argc, argv); \
if (arg == 0) \
\
for (t = __start_kmod_tests; t < __stop_kmod_tests; t++) { \
if (test_run(t) != 0) \
- exit(EXIT_FAILURE); \
+ ret = EXIT_FAILURE; \
} \
\
- exit(EXIT_SUCCESS); \
+ exit(ret); \
}