summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/utils/lit/tests/shtest-format.py
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
committerpatrick <patrick@openbsd.org>2019-01-27 16:42:12 +0000
commitb773203fb58f3ef282fb69c832d8710cab5bc82d (patch)
treee75913f147570fbd75169647b144df85b88a038c /gnu/llvm/utils/lit/tests/shtest-format.py
parenttweak errno in previous (diff)
downloadwireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz
wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/utils/lit/tests/shtest-format.py')
-rw-r--r--gnu/llvm/utils/lit/tests/shtest-format.py89
1 files changed, 87 insertions, 2 deletions
diff --git a/gnu/llvm/utils/lit/tests/shtest-format.py b/gnu/llvm/utils/lit/tests/shtest-format.py
index 94d74e3a920..8c318697195 100644
--- a/gnu/llvm/utils/lit/tests/shtest-format.py
+++ b/gnu/llvm/utils/lit/tests/shtest-format.py
@@ -1,8 +1,10 @@
# Check the various features of the ShTest format.
#
-# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out
+# RUN: rm -f %t.xml
+# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out
# RUN: FileCheck < %t.out %s
-#
+# RUN: FileCheck --check-prefix=XUNIT < %t.xml %s
+
# END.
# CHECK: -- Testing:
@@ -39,6 +41,7 @@
#
# CHECK: Command Output (stdout):
# CHECK-NEXT: --
+# CHECK-NEXT: $ ":" "RUN: at line 1"
# CHECK-NEXT: $ "printf"
# CHECK-NEXT: # command output:
# CHECK-NEXT: line 1: failed test output on stdout
@@ -83,3 +86,85 @@
# CHECK: Unresolved Tests : 3
# CHECK: Unexpected Passes : 1
# CHECK: Unexpected Failures: 3
+
+
+# XUNIT: <?xml version="1.0" encoding="UTF-8" ?>
+# XUNIT-NEXT: <testsuites>
+# XUNIT-NEXT: <testsuite name="shtest-format" tests="23" failures="7" skipped="5">
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="argv0.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.external_shell" name="fail.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+
+# XUNIT: <testcase classname="shtest-format.external_shell" name="fail_with_bad_encoding.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+# XUNIT: <testcase classname="shtest-format.external_shell" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="fail.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="no-test-line.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-missing.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature || a-missing-feature-2" />
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-present.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-missing.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature" />
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-present.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-star.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-triple.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT:<skipped message="Skipping because of: x86_64" />
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-true.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT:<skipped message="Skipping because of configuration." />
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-star.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+# XUNIT: <testcase classname="shtest-format.unsupported_dir" name="some-test.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT:<skipped message="Skipping because of configuration." />
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-true.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-feature.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-target.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail.txt" time="{{[0-9]+\.[0-9]+}}"/>
+
+# XUNIT: <testcase classname="shtest-format.shtest-format" name="xpass.txt" time="{{[0-9]+\.[0-9]+}}">
+# XUNIT-NEXT: <failure{{[ ]*}}>
+# XUNIT: </failure>
+# XUNIT-NEXT: </testcase>
+
+# XUNIT: </testsuite>
+# XUNIT-NEXT: </testsuites>