[llvm] [ci] Handle the case where all reported tests pass but the build is still a failure (PR #120264)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 01:04:21 PST 2025


================
@@ -70,10 +72,51 @@ def test_no_failures(self):
             ),
         )
 
+    def test_no_failures_build_failed(self):
+        self.assertEqual(
+            _generate_report(
+                "Foo",
+                1,
+                [
+                    junit_from_xml(
+                        dedent(
+                            """\
+          <?xml version="1.0" encoding="UTF-8"?>
+          <testsuites time="0.00">
+          <testsuite name="Passed" tests="1" failures="0" skipped="0" time="0.00">
+          <testcase classname="Bar/test_1" name="test_1" time="0.00"/>
+          </testsuite>
+          </testsuites>"""
----------------
DavidSpickett wrote:

Ok cool. Tbh it will be `try: parse the file; except almost anything: ignore it`, so it's not hard to do at short notice.

https://github.com/llvm/llvm-project/pull/120264


More information about the llvm-commits mailing list