diff options
author | Rae Moar <rmoar@google.com> | 2023-07-25 23:25:16 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-26 21:29:21 +0200 |
commit | 723c8258c8fe167191b53e274dea435c4522e4d7 (patch) | |
tree | 37b261e031eb9d1485db9f6dc002a1ce292a5389 /lib/memcpy_kunit.c | |
parent | kunit: Add ability to filter attributes (diff) | |
download | linux-723c8258c8fe167191b53e274dea435c4522e4d7.tar.xz linux-723c8258c8fe167191b53e274dea435c4522e4d7.zip |
kunit: tool: Add command line interface to filter and report attributes
Add ability to kunit.py to filter attributes and report a list of tests
including attributes without running tests.
Add flag "--filter" to input filters on test attributes. Tests will be
filtered out if they do not match all inputted filters.
Example: --filter speed=slow (This filter would run only the tests that are
marked as slow)
Filters have operations: <, >, <=, >=, !=, and =. But note that the
characters < and > are often interpreted by the shell, so they may need to
be quoted or escaped.
Example: --filter "speed>slow" or --filter speed\>slow (This filter would
run only the tests that have the speed faster than slow.
Additionally, multiple filters can be used.
Example: --filter "speed=slow, module!=example" (This filter would run
only the tests that have the speed slow and are not in the "example"
module)
Note if the user wants to skip filtered tests instead of not
running/showing them use the "--filter_action=skip" flag instead.
Expose the output of kunit.action=list option with flag "--list_tests" to
output a list of tests. Additionally, add flag "--list_tests_attr" to
output a list of tests and their attributes. These flags are useful to see
tests and test attributes without needing to run tests.
Example of the output of "--list_tests_attr":
example
example.test_1
example.test_2
# example.test_2.speed: slow
This output includes a suite, example, with two test cases, test_1 and
test_2. And in this instance test_2 has been marked as slow.
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/memcpy_kunit.c')
0 files changed, 0 insertions, 0 deletions