Skip to content

Commit 78bb0b4

Browse files
committed
[lit] Move the shtest-xunit-output check lines into shtest-format
These two tests are operating on the same test suite, which causes them to be racy about writing temporary files and can cause spurious failures. Merge them into one test to avoid the issue. llvm-svn: 337718
1 parent 488bd01 commit 78bb0b4

File tree

2 files changed

+86
-86
lines changed

2 files changed

+86
-86
lines changed

llvm/utils/lit/tests/shtest-format.py

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Check the various features of the ShTest format.
22
#
3-
# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out
3+
# RUN: rm -f %t.xml
4+
# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out
45
# RUN: FileCheck < %t.out %s
5-
#
6+
# RUN: FileCheck --check-prefix=XUNIT < %t.xml %s
7+
68
# END.
79

810
# CHECK: -- Testing:
@@ -84,3 +86,85 @@
8486
# CHECK: Unresolved Tests : 3
8587
# CHECK: Unexpected Passes : 1
8688
# CHECK: Unexpected Failures: 3
89+
90+
91+
# XUNIT: <?xml version="1.0" encoding="UTF-8" ?>
92+
# XUNIT-NEXT: <testsuites>
93+
# XUNIT-NEXT: <testsuite name="shtest-format" tests="23" failures="7" skipped="5">
94+
95+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="argv0.txt" time="{{[0-9]+\.[0-9]+}}"/>
96+
97+
# XUNIT: <testcase classname="shtest-format.external_shell" name="fail.txt" time="{{[0-9]+\.[0-9]+}}">
98+
# XUNIT-NEXT: <failure{{[ ]*}}>
99+
# XUNIT: </failure>
100+
# XUNIT-NEXT: </testcase>
101+
102+
103+
# XUNIT: <testcase classname="shtest-format.external_shell" name="fail_with_bad_encoding.txt" time="{{[0-9]+\.[0-9]+}}">
104+
# XUNIT-NEXT: <failure{{[ ]*}}>
105+
# XUNIT: </failure>
106+
# XUNIT-NEXT: </testcase>
107+
108+
# XUNIT: <testcase classname="shtest-format.external_shell" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/>
109+
110+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="fail.txt" time="{{[0-9]+\.[0-9]+}}">
111+
# XUNIT-NEXT: <failure{{[ ]*}}>
112+
# XUNIT: </failure>
113+
# XUNIT-NEXT: </testcase>
114+
115+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="no-test-line.txt" time="{{[0-9]+\.[0-9]+}}">
116+
# XUNIT-NEXT: <failure{{[ ]*}}>
117+
# XUNIT: </failure>
118+
# XUNIT-NEXT: </testcase>
119+
120+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/>
121+
122+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-missing.txt" time="{{[0-9]+\.[0-9]+}}">
123+
# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature || a-missing-feature-2" />
124+
125+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-present.txt" time="{{[0-9]+\.[0-9]+}}"/>
126+
127+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-missing.txt" time="{{[0-9]+\.[0-9]+}}">
128+
# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature" />
129+
130+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-present.txt" time="{{[0-9]+\.[0-9]+}}"/>
131+
132+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-star.txt" time="{{[0-9]+\.[0-9]+}}">
133+
# XUNIT-NEXT: <failure{{[ ]*}}>
134+
# XUNIT: </failure>
135+
# XUNIT-NEXT: </testcase>
136+
137+
138+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-triple.txt" time="{{[0-9]+\.[0-9]+}}">
139+
# XUNIT-NEXT:<skipped message="Skipping because of: x86_64" />
140+
141+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/>
142+
143+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-true.txt" time="{{[0-9]+\.[0-9]+}}">
144+
# XUNIT-NEXT:<skipped message="Skipping because of configuration." />
145+
146+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-star.txt" time="{{[0-9]+\.[0-9]+}}">
147+
# XUNIT-NEXT: <failure{{[ ]*}}>
148+
# XUNIT: </failure>
149+
# XUNIT-NEXT: </testcase>
150+
151+
# XUNIT: <testcase classname="shtest-format.unsupported_dir" name="some-test.txt" time="{{[0-9]+\.[0-9]+}}">
152+
# XUNIT-NEXT:<skipped message="Skipping because of configuration." />
153+
154+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/>
155+
156+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-true.txt" time="{{[0-9]+\.[0-9]+}}"/>
157+
158+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-feature.txt" time="{{[0-9]+\.[0-9]+}}"/>
159+
160+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-target.txt" time="{{[0-9]+\.[0-9]+}}"/>
161+
162+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail.txt" time="{{[0-9]+\.[0-9]+}}"/>
163+
164+
# XUNIT: <testcase classname="shtest-format.shtest-format" name="xpass.txt" time="{{[0-9]+\.[0-9]+}}">
165+
# XUNIT-NEXT: <failure{{[ ]*}}>
166+
# XUNIT: </failure>
167+
# XUNIT-NEXT: </testcase>
168+
169+
# XUNIT: </testsuite>
170+
# XUNIT-NEXT: </testsuites>

llvm/utils/lit/tests/shtest-xunit-output.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)