================
@@ -623,3 +625,63 @@ def test_report_size_limit(self):
                 )
             ),
         )
+
+    def test_generate_report_end_to_end(self):
+        with tempfile.TemporaryDirectory() as temp_dir:
+            junit_xml_file = os.path.join(temp_dir, "junit.xml")
+            with open(junit_xml_file, "w") as junit_xml_handle:
+                junit_xml_handle.write(
+                    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>"""
+                    )
+                )
+            ninja_log_file = os.path.join(temp_dir, "ninja.log")
+            with open(ninja_log_file, "w") as ninja_log_handle:
+                ninja_log_handle.write(
+                    dedent(
+                        """\
+                        [1/5] test/1.stamp
+                        [2/5] test/2.stamp
+                        [3/5] test/3.stamp
+                        [4/5] test/4.stamp
+                        FAILED: test/4.stamp
+                        touch test/4.stamp
+                        Wow! That's so True!
+                        [5/5] test/5.stamp"""
+                    )
+                )
+            test = generate_test_report_lib.generate_report_from_files(
+                "Foo", 1, [junit_xml_file, ninja_log_file]
+            )
+
+            print(test)
----------------
boomanaiden154 wrote:

Fixed.

I thought I went through my patches beforehand to make sure I had gotten rid of 
all the debugging cruft, but apparently I didn't go through them closely 
enough...

https://github.com/llvm/llvm-project/pull/152622
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to