[llvm] [lit] Add --report-failures-only option for lit test reports (PR #115439)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 00:48:32 PST 2024


================
@@ -0,0 +1,17 @@
+# UNSUPPORTED: system-windows
+
+# Check xunit output
+# RUN: rm -rf %t.xunit.xml
+# RUN: not %{lit} --report-failures-only --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output
+# If xmllint is installed verify that the generated xml is well-formed
+# RUN: sh -c 'if command -v xmllint 2>/dev/null; then xmllint --noout %t.xunit.xml; fi'
----------------
jh7370 wrote:

This feels unnecessary, and it's forcing an `UNSUPPORTED: system-windows` line (actually, I suspect the requirement is on the `shell` not on non-Windows, but that's an aside - it would be better to not have the requirement at all). You're checking the contents of the file immediately below, so as long as your contents check is valid, you'll know that the XML must be valid.

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


More information about the llvm-commits mailing list