mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-03 00:17:59 +02:00
test: don't abort if the device filter filtered all devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
767c1691cd
commit
887895c1c1
1 changed files with 7 additions and 2 deletions
|
|
@ -640,6 +640,7 @@ _litest_add_ranged_for_device(const char *name,
|
|||
{
|
||||
struct suite *s;
|
||||
struct litest_test_device **dev = devices;
|
||||
bool device_filtered = false;
|
||||
|
||||
assert(type < LITEST_NO_DEVICE);
|
||||
|
||||
|
|
@ -654,8 +655,10 @@ _litest_add_ranged_for_device(const char *name,
|
|||
s = get_suite(name);
|
||||
for (; *dev; dev++) {
|
||||
if (filter_device &&
|
||||
fnmatch(filter_device, (*dev)->shortname, 0) != 0)
|
||||
fnmatch(filter_device, (*dev)->shortname, 0) != 0) {
|
||||
device_filtered = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*dev)->type == type) {
|
||||
litest_add_tcase_for_device(s,
|
||||
|
|
@ -667,7 +670,9 @@ _litest_add_ranged_for_device(const char *name,
|
|||
}
|
||||
}
|
||||
|
||||
litest_abort_msg("Invalid test device type");
|
||||
/* only abort if no filter was set, that's a bug */
|
||||
if (!device_filtered)
|
||||
litest_abort_msg("Invalid test device type");
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue