kunit: tool: fix minor typing issue with None status
authorDaniel Latypov <dlatypov@google.com>
Fri, 15 Jan 2021 00:39:12 +0000 (16:39 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Sat, 16 Jan 2021 00:51:47 +0000 (17:51 -0700)
commit81c60306dc588e2e6b21391c1f6dd509403e6eec
treec81080c2f5cc1fae02314b92b5d667122616f4dd
parent09641f7c7d8f1309fe9ad9ce4e6a1697016d73ba
kunit: tool: fix minor typing issue with None status

The code to handle aggregating statuses didn't check that the status
actually got set to some non-None value.
Default the value to SUCCESS instead of adding a bunch of `is None`
checks.

This sorta follows the precedent in commit 3fc48259d525 ("kunit: Don't
fail test suites if one of them is empty").

Also slightly simplify the code and add type annotations.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py