[llvm] r337718 - [lit] Move the shtest-xunit-output check lines into shtest-format

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 11:08:36 PDT 2018


Author: bogner
Date: Mon Jul 23 11:08:36 2018
New Revision: 337718

URL: http://llvm.org/viewvc/llvm-project?rev=337718&view=rev
Log:
[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.

Removed:
    llvm/trunk/utils/lit/tests/shtest-xunit-output.py
Modified:
    llvm/trunk/utils/lit/tests/shtest-format.py

Modified: llvm/trunk/utils/lit/tests/shtest-format.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/shtest-format.py?rev=337718&r1=337717&r2=337718&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/shtest-format.py (original)
+++ llvm/trunk/utils/lit/tests/shtest-format.py Mon Jul 23 11:08:36 2018
@@ -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:
@@ -84,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>

Removed: llvm/trunk/utils/lit/tests/shtest-xunit-output.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/shtest-xunit-output.py?rev=337717&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/shtest-xunit-output.py (original)
+++ llvm/trunk/utils/lit/tests/shtest-xunit-output.py (removed)
@@ -1,84 +0,0 @@
-# RUN: rm -f %t.xml
-# 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" skipped="5">
-
-# 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-NEXT:<skipped message="Skipping because of: a-missing-feature || a-missing-feature-2" />
-
-# 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-NEXT:<skipped message="Skipping because of: a-missing-feature" />
-
-# 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-NEXT:<skipped message="Skipping because of: x86_64" />
-
-# 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-NEXT:<skipped message="Skipping because of configuration." />
-
-# 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-NEXT:<skipped message="Skipping because of configuration." />
-
-# 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>




More information about the llvm-commits mailing list