kunit: tool: Do not error on tests without test plans
authorDavid Gow <davidgow@google.com>
Tue, 2 Nov 2021 07:30:11 +0000 (00:30 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Dec 2021 20:36:06 +0000 (13:36 -0700)
commitc68077b14692f4a5d42334625d6d4924b234791e
treede43fd9a4c0d73f36896077816efd56c8c3d7f6e
parentee92ed38364e7073bb741577d7b243b232442014
kunit: tool: Do not error on tests without test plans

The (K)TAP spec encourages test output to begin with a 'test plan': a
count of the number of tests being run of the form:
1..n

However, some test suites might not know the number of subtests in
advance (for example, KUnit's parameterised tests use a generator
function). In this case, it's not possible to print the test plan in
advance.

kunit_tool already parses test output which doesn't contain a plan, but
reports an error. Since we want to use nested subtests with KUnit
paramterised tests, remove this error.

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