teak-llvm/llvm/utils/lit/tests/xunit-output.py
Chris Matthews 069a1eb3bb [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
2018-05-09 23:48:32 +00:00

12 lines
505 B
Python

# Check xunit output
# RUN: %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/test-data
# RUN: FileCheck < %t.xunit.xml %s
# CHECK: <?xml version="1.0" encoding="UTF-8" ?>
# CHECK: <testsuites>
# 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>