kunit: tool: fix parsing of test attributes
authorRae Moar <rmoar@google.com>
Thu, 7 Dec 2023 21:34:09 +0000 (21:34 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 18 Dec 2023 20:21:15 +0000 (13:21 -0700)
commit8ae27bc7fff4ef467a7964821a6cedb34a05d3b2
treec6d2c03de0ad7acd4b0934828843b588e0c1a628
parent1557e89d3af51a4f1bd6870b3117bed651de5dbf
kunit: tool: fix parsing of test attributes

Add parsing of attributes as diagnostic data. Fixes issue with test plan
being parsed incorrectly as diagnostic data when located after
suite-level attributes.

Note that if there does not exist a test plan line, the diagnostic lines
between the suite header and the first result will be saved in the suite
log rather than the first test case log.

Signed-off-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py