1 From c6267c8d4eaae58ccc94a9beb113d17438b39d6b Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 15 Oct 2020 19:28:17 +0300
4 Subject: kunit: Don't fail test suites if one of them is empty
6 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
8 [ Upstream commit 3fc48259d5250f7a3ee021ad0492b604c428c564 ]
10 Empty test suite is okay test suite.
12 Don't fail the rest of the test suites if one of them is empty.
14 Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests")
15 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
16 Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
17 Tested-by: Brendan Higgins <brendanhiggins@google.com>
18 Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
21 tools/testing/kunit/kunit_parser.py | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
25 index 62a0848699671..91036d5d51cf6 100644
26 --- a/tools/testing/kunit/kunit_parser.py
27 +++ b/tools/testing/kunit/kunit_parser.py
28 @@ -232,7 +232,7 @@ def parse_test_suite(lines: List[str]) -> TestSuite:
30 test_suite.name = name
31 expected_test_case_num = parse_subtest_plan(lines)
32 - if not expected_test_case_num:
33 + if expected_test_case_num is None:
35 while expected_test_case_num > 0:
36 test_case = parse_test_case(lines)