summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/lit/tests')
-rw-r--r--llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini4
-rw-r--r--llvm/utils/lit/tests/xunit-output.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini b/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini
index 8dfc6852b24..3234da66aa4 100644
--- a/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini
+++ b/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini
@@ -1,7 +1,7 @@
[global]
result_code = FAIL
-result_output = & < > "
+result_output = & < > ]]> &"
[results]
value0 = 1
-value1 = 2.3456 \ No newline at end of file
+value1 = 2.3456
diff --git a/llvm/utils/lit/tests/xunit-output.py b/llvm/utils/lit/tests/xunit-output.py
index 436acd37247..9d3cd762df4 100644
--- a/llvm/utils/lit/tests/xunit-output.py
+++ b/llvm/utils/lit/tests/xunit-output.py
@@ -1,12 +1,14 @@
# Check xunit output
# 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='1' skipped='0'>
# CHECK: <testcase classname='test-data.test-data' name='bad&amp;name.ini' time='{{[0-1]}}.{{[0-9]+}}'>
-# CHECK-NEXT: <failure ><![CDATA[& < > "]]></failure>
+# CHECK-NEXT: <failure ><![CDATA[& < > ]]]]><![CDATA[> &"]]></failure>
# CHECK: </testsuite>
# CHECK: </testsuites>
OpenPOWER on IntegriCloud