linux-stable/lib/kunit
Daniel Latypov a127b154a8 kunit: tool: allow filtering test cases via glob
Commit 1d71307a6f ("kunit: add unit test for filtering suites by
names") introduced the ability to filter which suites we run via glob.

This change extends it so we can also filter individual test cases
inside of suites as well.

This is quite useful when, e.g.
* trying to run just the tests cases you've just added or are working on
* trying to debug issues with test hermeticity

Examples:
$ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit '*exec*.parse*'
...
============================================================
======== [PASSED] kunit_executor_test ========
[PASSED] parse_filter_test
============================================================
Testing complete. 1 tests run. 0 failed. 0 crashed.

$ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit '*.no_matching_tests'
...
[ERROR] no tests run!

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-10-19 14:18:49 -06:00
..
.kunitconfig kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment 2021-04-02 14:14:36 -06:00
assert.c kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals 2021-04-02 14:14:16 -06:00
debugfs.c kunit: Support skipped tests 2021-06-25 11:31:03 -06:00
debugfs.h kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display 2020-03-26 14:07:18 -06:00
executor.c kunit: tool: allow filtering test cases via glob 2021-10-19 14:18:49 -06:00
executor_test.c kunit: tool: allow filtering test cases via glob 2021-10-19 14:18:49 -06:00
Kconfig kunit: add kunit.filter_glob cmdline option to filter suites 2021-02-08 16:09:27 -07:00
kunit-example-test.c kunit: test: Add example tests which are always skipped 2021-06-25 11:31:03 -06:00
kunit-test.c kunit: drop assumption in kunit-log-test about current suite 2021-10-19 14:18:49 -06:00
Makefile kunit: test: create a single centralized executor for all tests 2020-10-09 14:37:34 -06:00
string-stream-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
string-stream.c kunit: generalize kunit_resource API beyond allocated resources 2020-06-26 14:12:00 -06:00
string-stream.h isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
test.c kunit: Print test statistics on failure 2021-08-13 13:38:31 -06:00
try-catch-impl.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00
try-catch.c kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds 2020-01-09 16:42:55 -07:00