From: Andy Shevchenko Date: Thu, 15 Oct 2020 16:28:17 +0000 (+0300) Subject: kunit: Don't fail test suites if one of them is empty X-Git-Tag: v5.15~2400^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fc48259d5250f7a3ee021ad0492b604c428c564;p=platform%2Fkernel%2Flinux-starfive.git kunit: Don't fail test suites if one of them is empty Empty test suite is okay test suite. Don't fail the rest of the test suites if one of them is empty. Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests") Signed-off-by: Andy Shevchenko Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan --- diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py index 744ee9c..84a1af2 100644 --- a/tools/testing/kunit/kunit_parser.py +++ b/tools/testing/kunit/kunit_parser.py @@ -241,7 +241,7 @@ def parse_test_suite(lines: List[str], expected_suite_index: int) -> TestSuite: return None test_suite.name = name expected_test_case_num = parse_subtest_plan(lines) - if not expected_test_case_num: + if expected_test_case_num is None: return None while expected_test_case_num > 0: test_case = parse_test_case(lines)