kunit: tool: fix parsing of test attributes
authorRae Moar <rmoar@google.com>
Thu, 7 Dec 2023 21:34:09 +0000 (21:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:15 +0000 (20:14 +0000)
commit29482da8ffa1eae52444f11ac6101e7a8dc0d990
tree4c85e52f4d49b4182f4b01994a7a65fb9a980c99
parentf6bda29501226fd47a0e9e7b9abeea267b1931e9
kunit: tool: fix parsing of test attributes

[ Upstream commit 8ae27bc7fff4ef467a7964821a6cedb34a05d3b2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/kunit/kunit_parser.py