aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/lit/tests/xunit-output.py
diff options
context:
space:
mode:
authorAlexander Richardson <arichardson.kde@gmail.com>2018-05-16 09:00:28 +0000
committerAlexander Richardson <arichardson.kde@gmail.com>2018-05-16 09:00:28 +0000
commit1bffd0f7414623ca4ed8ae4768b827f29fa173ad (patch)
tree9472990a5c7480f74c77ac075aebd9c6f55e3d33 /llvm/utils/lit/tests/xunit-output.py
parent8f44579d0bf1da80adebf6a7cd1095eabc1e1e0e (diff)
downloadllvm-1bffd0f7414623ca4ed8ae4768b827f29fa173ad.zip
llvm-1bffd0f7414623ca4ed8ae4768b827f29fa173ad.tar.gz
llvm-1bffd0f7414623ca4ed8ae4768b827f29fa173ad.tar.bz2
Escape ]]> in xunit xml output
Summary: This sequence ends the CDATA block so any characters after that are no longer escaped. This can be fixed by replacing "]]>" with "]]]]><![CDATA[>". Reviewers: cmatthews Reviewed By: cmatthews Differential Revision: https://reviews.llvm.org/D46886 llvm-svn: 332440
Diffstat (limited to 'llvm/utils/lit/tests/xunit-output.py')
-rw-r--r--llvm/utils/lit/tests/xunit-output.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/lit/tests/xunit-output.py b/llvm/utils/lit/tests/xunit-output.py
index 436acd3..9d3cd76 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>