summaryrefslogtreecommitdiff
path: root/utils/lit/tests/xunit-output.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/lit/tests/xunit-output.py')
-rw-r--r--utils/lit/tests/xunit-output.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/lit/tests/xunit-output.py b/utils/lit/tests/xunit-output.py
index 3f4939536379..930768e61dae 100644
--- a/utils/lit/tests/xunit-output.py
+++ b/utils/lit/tests/xunit-output.py
@@ -1,10 +1,16 @@
+# REQUIRES: shell
+
# Check xunit output
-# RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data
+# RUN: rm -rf %t.xunit.xml
+# RUN: not %{lit} --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'
# RUN: FileCheck < %t.xunit.xml %s
# CHECK: <?xml version="1.0" encoding="UTF-8" ?>
# CHECK: <testsuites>
-# CHECK: <testsuite name='test-data' tests='1' failures='0'>
-# CHECK: <testcase classname='test-data.test-data' name='metrics.ini' time='0.{{[0-9]+}}'/>
+# CHECK: <testsuite name="test-data" tests="1" failures="1" skipped="0">
+# CHECK: <testcase classname="test-data.test-data" name="bad&amp;name.ini" time="{{[0-1]}}.{{[0-9]+}}">
+# CHECK-NEXT: <failure ><![CDATA[& < > ]]]]><![CDATA[> &"]]></failure>
# CHECK: </testsuite>
# CHECK: </testsuites>