diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2024-03-15 10:11:54 +1000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-18 16:25:47 +0000 |
commit | 34f86489a837fc40700bd4de94f7e6239e3d2f96 (patch) | |
tree | 2dc0f87de826ffcb28fea74b1752be8bf031ef3a | |
parent | c775c23121df23863da861dbd76e31cc12d4b4dc (diff) |
Revert "test: allow for substring matching in the various --filter- arguments"
Substring matching means it's impossible to select filters that are
substrings of others, making it too painful to test one specific filter.
This reverts commit a524cf97619f97c742f982065b6aa7698ca4779f.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/984>
-rw-r--r-- | test/litest.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/test/litest.c b/test/litest.c index ebe0a93b..d7a23031 100644 --- a/test/litest.c +++ b/test/litest.c @@ -383,7 +383,6 @@ litest_add_tcase_no_device(struct suite *suite, const char *test_name = funcname; if (filter_device && - strstr(test_name, filter_device) == NULL && fnmatch(filter_device, test_name, 0) != 0) return; @@ -409,7 +408,6 @@ litest_add_tcase_deviceless(struct suite *suite, const char *test_name = funcname; if (filter_device && - strstr(test_name, filter_device) == NULL && fnmatch(filter_device, test_name, 0) != 0) return; @@ -475,7 +473,6 @@ litest_add_tcase(const char *filename, litest_assert(excluded >= LITEST_DEVICELESS); if (filter_test && - strstr(funcname, filter_test) == NULL && fnmatch(filter_test, funcname, 0) != 0) return; @@ -502,7 +499,6 @@ litest_add_tcase(const char *filename, continue; if (filter_device && - strstr(dev->shortname, filter_device) == NULL && fnmatch(filter_device, dev->shortname, 0) != 0) continue; if ((dev->features & required) != required || @@ -524,7 +520,6 @@ litest_add_tcase(const char *filename, continue; if (filter_device && - strstr(dev->shortname, filter_device) == NULL && fnmatch(filter_device, dev->shortname, 0) != 0) continue; @@ -629,18 +624,17 @@ _litest_add_ranged_for_device(const char *filename, litest_assert(type < LITEST_NO_DEVICE); if (filter_test && - strstr(funcname, filter_test) == NULL && fnmatch(filter_test, funcname, 0) != 0) return; create_suite_name(filename, suite_name); + if (filter_group && fnmatch(filter_group, suite_name, 0) != 0) return; s = get_suite(suite_name); list_for_each(dev, &devices, node) { if (filter_device && - strstr(dev->shortname, filter_device) == NULL && fnmatch(filter_device, dev->shortname, 0) != 0) { device_filtered = true; continue; |