mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 00:00:09 +01:00
test: only abort when we fail to add any tests and we have no filters
This prevents any tests from being added but not run in the normal setup. But as soon as filters are manually specified on the list proceed anyway. Otherwise it's impossible to run specific sets of tests, e.g. things like running all tests applicable to a specific device with --filter-device=foo Now that all tests are in the same binary we are guaranteed that at least some tests don't apply, so the above was guaranteed to abort. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a43042425e
commit
ad2a51152f
1 changed files with 4 additions and 1 deletions
|
|
@ -646,7 +646,10 @@ litest_add_tcase(const char *suite_name,
|
|||
}
|
||||
}
|
||||
|
||||
if (!added) {
|
||||
if (!added &&
|
||||
filter_test == NULL &&
|
||||
filter_device == NULL &&
|
||||
filter_group == NULL) {
|
||||
fprintf(stderr, "Test '%s' does not match any devices. Aborting.\n", funcname);
|
||||
abort();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue