Merge tag 'tegra-for-5.15-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / tools / testing / kunit / kunit_tool_test.py
index bdae0e5..75045aa 100755 (executable)
@@ -157,8 +157,18 @@ class KUnitParserTest(unittest.TestCase):
                        kunit_parser.TestStatus.FAILURE,
                        result.status)
 
+       def test_no_header(self):
+               empty_log = test_data_path('test_is_test_passed-no_tests_run_no_header.log')
+               with open(empty_log) as file:
+                       result = kunit_parser.parse_run_tests(
+                               kunit_parser.extract_tap_lines(file.readlines()))
+               self.assertEqual(0, len(result.suites))
+               self.assertEqual(
+                       kunit_parser.TestStatus.FAILURE_TO_PARSE_TESTS,
+                       result.status)
+
        def test_no_tests(self):
-               empty_log = test_data_path('test_is_test_passed-no_tests_run.log')
+               empty_log = test_data_path('test_is_test_passed-no_tests_run_with_header.log')
                with open(empty_log) as file:
                        result = kunit_parser.parse_run_tests(
                                kunit_parser.extract_tap_lines(file.readlines()))
@@ -173,7 +183,7 @@ class KUnitParserTest(unittest.TestCase):
                with open(crash_log) as file:
                        result = kunit_parser.parse_run_tests(
                                kunit_parser.extract_tap_lines(file.readlines()))
-               print_mock.assert_any_call(StrContains('no tests run!'))
+               print_mock.assert_any_call(StrContains('could not parse test results!'))
                print_mock.stop()
                file.close()
 
@@ -309,7 +319,7 @@ class KUnitJsonTest(unittest.TestCase):
                        result["sub_groups"][1]["test_cases"][0])
 
        def test_no_tests_json(self):
-               result = self._json_for('test_is_test_passed-no_tests_run.log')
+               result = self._json_for('test_is_test_passed-no_tests_run_with_header.log')
                self.assertEqual(0, len(result['sub_groups']))
 
 class StrContains(str):