summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests/shtest-xunit-output.py
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2018-04-20 10:11:41 +0000
committerDan Liew <dan@su-root.co.uk>2018-04-20 10:11:41 +0000
commit872b8ea596297fe18fa09541f99562976e9767ff (patch)
tree9cd7b7b50e65d0c8b34a4c6fcfdf40d48a983b67 /llvm/utils/lit/tests/shtest-xunit-output.py
parent87f6c24f991cc1a8ba029a205766d2c8e079cc01 (diff)
downloadbcm5719-llvm-872b8ea596297fe18fa09541f99562976e9767ff.tar.gz
bcm5719-llvm-872b8ea596297fe18fa09541f99562976e9767ff.zip
[lit] Fix a bug where UNRESOLVED tests were not handled in the XUnit
XML printer. A test has been added that tries to comprehensively test emitting XUnit XML output for shell tests. Differential Revision: https://reviews.llvm.org/D45567 llvm-svn: 330409
Diffstat (limited to 'llvm/utils/lit/tests/shtest-xunit-output.py')
-rw-r--r--llvm/utils/lit/tests/shtest-xunit-output.py78
1 files changed, 78 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/shtest-xunit-output.py b/llvm/utils/lit/tests/shtest-xunit-output.py
new file mode 100644
index 00000000000..853ed560e80
--- /dev/null
+++ b/llvm/utils/lit/tests/shtest-xunit-output.py
@@ -0,0 +1,78 @@
+# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format - --xunit-xml-output %t.xml
+# RUN: FileCheck < %t.xml %s
+
+# CHECK: <?xml version="1.0" encoding="UTF-8" ?>
+# CHECK-NEXT: <testsuites>
+# CHECK-NEXT: <testsuite name='shtest-format' tests='23' failures='7'>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='argv0.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.external_shell' name='fail.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+
+# CHECK: <testcase classname='shtest-format.external_shell' name='fail_with_bad_encoding.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+# CHECK: <testcase classname='shtest-format.external_shell' name='pass.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='fail.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='no-test-line.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='pass.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-any-missing.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-any-present.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-missing.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-present.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-star.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-triple.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-expr-false.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-expr-true.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-star.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+# CHECK: <testcase classname='shtest-format.unsupported_dir' name='some-test.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail-expr-false.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail-expr-true.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail-feature.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail-target.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail.txt' time='{{[0-9]+\.[0-9]+}}'/>
+
+# CHECK: <testcase classname='shtest-format.shtest-format' name='xpass.txt' time='{{[0-9]+\.[0-9]+}}'>
+# CHECK-NEXT: <failure{{[ ]*}}>
+# CHECK: </failure>
+# CHECK-NEXT: </testcase>
+
+# CHECK: </testsuite>
+# CHECK-NEXT: </testsuites>
OpenPOWER on IntegriCloud