aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/lit/tests/xunit-output.py
diff options
context:
space:
mode:
authorChris Matthews <cmatthews5@apple.com>2018-05-09 23:48:32 +0000
committerChris Matthews <cmatthews5@apple.com>2018-05-09 23:48:32 +0000
commit069a1eb3bbcb9d959ae8d61738c8b98a5398096a (patch)
treea6e3b5117307f0c6f53da155f95ae8f49565d790 /llvm/utils/lit/tests/xunit-output.py
parent2f348ea1c75646d98b9079fae527c6e600a2beb1 (diff)
downloadllvm-069a1eb3bbcb9d959ae8d61738c8b98a5398096a.zip
llvm-069a1eb3bbcb9d959ae8d61738c8b98a5398096a.tar.gz
llvm-069a1eb3bbcb9d959ae8d61738c8b98a5398096a.tar.bz2
[LIT] Handle xml characters in test names
Lit creates malformed xml when the test case has an & in the name. Escape those correctly. This also adds a test case which I will add other nasty encoding issues to in some followup commits. llvm-svn: 331942
Diffstat (limited to 'llvm/utils/lit/tests/xunit-output.py')
-rw-r--r--llvm/utils/lit/tests/xunit-output.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/lit/tests/xunit-output.py b/llvm/utils/lit/tests/xunit-output.py
index 5368990..396f10e 100644
--- a/llvm/utils/lit/tests/xunit-output.py
+++ b/llvm/utils/lit/tests/xunit-output.py
@@ -4,7 +4,8 @@
# CHECK: <?xml version="1.0" encoding="UTF-8" ?>
# CHECK: <testsuites>
-# CHECK: <testsuite name='test-data' tests='1' failures='0'>
+# CHECK: <testsuite name='test-data' tests='2' failures='0'>
+# CHECK: <testcase classname='test-data.test-data' name='bad&amp;name.ini' time='{{[0-1]}}.{{[0-9]+}}'/>
# CHECK: <testcase classname='test-data.test-data' name='metrics.ini' time='{{[0-1]}}.{{[0-9]+}}'/>
# CHECK: </testsuite>
# CHECK: </testsuites>