Commit 8bb67c25 authored by Peter Hutterer's avatar Peter Hutterer

test: fail if the filter leaves us with zero tests

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent a1075070
......@@ -755,6 +755,12 @@ litest_run(int argc, char **argv)
int failed;
SRunner *sr = NULL;
if (list_empty(&all_tests)) {
fprintf(stderr,
"Error: filters are too strict, no tests to run.\n");
return 1;
}
if (in_debugger == -1) {
in_debugger = is_debugger_attached();
if (in_debugger)
......@@ -2204,6 +2210,8 @@ litest_parse_argv(int argc, char **argv)
int
main(int argc, char **argv)
{
list_init(&all_tests);
if (litest_parse_argv(argc, argv) != 0)
return EXIT_FAILURE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment