kunit: tool: Support skipped tests in kunit_tool
authorDavid Gow <davidgow@google.com>
Fri, 25 Jun 2021 06:58:13 +0000 (23:58 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 25 Jun 2021 17:31:03 +0000 (11:31 -0600)
commit5acaf6031f5349244e1fcfd74eb7b6212154fab3
treef5f43554e1c84bc19cf74d2213d5d8b99bc70e3f
parent6d2426b2f258da19fbe5fa1c93a5695460390eac
kunit: tool: Support skipped tests in kunit_tool

Add support for the SKIP directive to kunit_tool's TAP parser.

Skipped tests now show up as such in the printed summary. The number of
skipped tests is counted, and if all tests in a suite are skipped, the
suite is also marked as skipped. Otherwise, skipped tests do affect the
suite result.

Example output:
[00:22:34] ======== [SKIPPED] example_skip ========
[00:22:34] [SKIPPED] example_skip_test # SKIP this test should be skipped
[00:22:34] [SKIPPED] example_mark_skipped_test # SKIP this test should be skipped
[00:22:34] ============================================================
[00:22:34] Testing complete. 2 tests run. 0 failed. 0 crashed. 2 skipped.

Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py
tools/testing/kunit/kunit_tool_test.py
tools/testing/kunit/test_data/test_skip_all_tests.log [new file with mode: 0644]
tools/testing/kunit/test_data/test_skip_tests.log [new file with mode: 0644]