[llvm] r174072 - [lit] Add a test for the various ShTest format features.
Daniel Dunbar
daniel at zuster.org
Thu Jan 31 10:05:01 PST 2013
Author: ddunbar
Date: Thu Jan 31 12:05:01 2013
New Revision: 174072
URL: http://llvm.org/viewvc/llvm-project?rev=174072&view=rev
Log:
[lit] Add a test for the various ShTest format features.
Added:
llvm/trunk/utils/lit/tests/Inputs/shtest-format/
llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/
llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/fail.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-format/no-test-line.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/pass.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-missing.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-present.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/
llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg
llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-target.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail.txt
llvm/trunk/utils/lit/tests/Inputs/shtest-format/xpass.txt
llvm/trunk/utils/lit/tests/shtest-format.py
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,3 @@
+# Run a command that fails with error on stdout.
+#
+# RUN: cat "does-not-exist"
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+config.test_format = lit.formats.ShTest(execute_external=True)
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+# RUN: true
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/fail.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/fail.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/fail.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/fail.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+# RUN: false
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/lit.cfg Thu Jan 31 12:05:01 2013
@@ -0,0 +1,7 @@
+config.name = 'shtest-format'
+config.suffixes = ['.txt']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = None
+config.test_exec_root = None
+config.target_triple = 'x86_64-unknown-unknown'
+config.available_features.add('a-present-feature')
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/no-test-line.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/no-test-line.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/no-test-line.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/no-test-line.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+# Empty!
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/pass.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/pass.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/pass.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/pass.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+# RUN: true
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-missing.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-missing.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-missing.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-missing.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+RUN: true
+REQUIRES: a-missing-feature
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-present.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-present.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-present.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/requires-present.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+RUN: true
+REQUIRES: a-present-feature
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+config.unsupported = True
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1 @@
+# RUN: true
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+# RUN: false
+# XFAIL: a-present-feature
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-target.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-target.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-target.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail-target.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+RUN: false
+XFAIL: x86_64
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/xfail.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+RUN: false
+XFAIL: *
Added: llvm/trunk/utils/lit/tests/Inputs/shtest-format/xpass.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/shtest-format/xpass.txt?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/shtest-format/xpass.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/shtest-format/xpass.txt Thu Jan 31 12:05:01 2013
@@ -0,0 +1,2 @@
+RUN: true
+XFAIL: x86_64
Added: llvm/trunk/utils/lit/tests/shtest-format.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/shtest-format.py?rev=174072&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/shtest-format.py (added)
+++ llvm/trunk/utils/lit/tests/shtest-format.py Thu Jan 31 12:05:01 2013
@@ -0,0 +1,43 @@
+# Check the various features of the ShTest format.
+#
+# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out
+# RUN: FileCheck < %t.out %s
+#
+# END.
+
+# CHECK: -- Testing:
+
+# CHECK: FAIL: shtest-format :: external_shell/fail.txt
+# CHECK: *** TEST 'shtest-format :: external_shell/fail.txt' FAILED ***
+# CHECK: Command Output (stderr):
+# CHECK: cat: does-not-exist: No such file or directory
+# CHECK: --
+
+# CHECK: PASS: shtest-format :: external_shell/pass.txt
+
+# CHECK: FAIL: shtest-format :: fail.txt
+
+# CHECK: UNRESOLVED: shtest-format :: no-test-line.txt
+# CHECK: PASS: shtest-format :: pass.txt
+# CHECK: UNSUPPORTED: shtest-format :: requires-missing.txt
+# CHECK: PASS: shtest-format :: requires-present.txt
+# CHECK: UNSUPPORTED: shtest-format :: unsupported_dir/some-test.txt
+# CHECK: XFAIL: shtest-format :: xfail-feature.txt
+# CHECK: XFAIL: shtest-format :: xfail-target.txt
+# CHECK: XFAIL: shtest-format :: xfail.txt
+# CHECK: XPASS: shtest-format :: xpass.txt
+# CHECK: Testing Time
+
+# CHECK: Unexpected Passing Tests (1)
+# CHECK: shtest-format :: xpass.txt
+
+# CHECK: Failing Tests (2)
+# CHECK: shtest-format :: external_shell/fail.txt
+# CHECK: shtest-format :: fail.txt
+
+# CHECK: Expected Passes : 3
+# CHECK: Expected Failures : 3
+# CHECK: Unsupported Tests : 2
+# CHECK: Unresolved Tests : 1
+# CHECK: Unexpected Passes : 1
+# CHECK: Unexpected Failures: 2
More information about the llvm-commits
mailing list