[llvm] r174001 - [lit] Add a basic discovery test.

Daniel Dunbar daniel at zuster.org
Wed Jan 30 16:21:51 PST 2013


Author: ddunbar
Date: Wed Jan 30 18:21:51 2013
New Revision: 174001

URL: http://llvm.org/viewvc/llvm-project?rev=174001&view=rev
Log:
[lit] Add a basic discovery test.

Added:
    llvm/trunk/utils/lit/tests/Inputs/
    llvm/trunk/utils/lit/tests/Inputs/discovery/
    llvm/trunk/utils/lit/tests/Inputs/discovery/lit.cfg
    llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/
    llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg
    llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/test-three.py
    llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/
    llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg
    llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt
    llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt
    llvm/trunk/utils/lit/tests/Inputs/discovery/test-one.txt
    llvm/trunk/utils/lit/tests/Inputs/discovery/test-two.txt
    llvm/trunk/utils/lit/tests/discovery.py

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/lit.cfg?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/lit.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/lit.cfg Wed Jan 30 18:21:51 2013
@@ -0,0 +1,5 @@
+config.name = 'top-level-suite'
+config.suffixes = ['.txt']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = None
+config.test_exec_root = None

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+config.suffixes = ['.py']

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/test-three.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/test-three.py?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/test-three.py (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/subdir/test-three.py Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+# RUN: true

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg Wed Jan 30 18:21:51 2013
@@ -0,0 +1,5 @@
+config.name = 'sub-suite'
+config.suffixes = ['.txt']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = None
+config.test_exec_root = None

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+# RUN: true

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+# RUN: true

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/test-one.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/test-one.txt?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/test-one.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/test-one.txt Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+# RUN: true

Added: llvm/trunk/utils/lit/tests/Inputs/discovery/test-two.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/discovery/test-two.txt?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/discovery/test-two.txt (added)
+++ llvm/trunk/utils/lit/tests/Inputs/discovery/test-two.txt Wed Jan 30 18:21:51 2013
@@ -0,0 +1 @@
+# RUN: true

Added: llvm/trunk/utils/lit/tests/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/discovery.py?rev=174001&view=auto
==============================================================================
--- llvm/trunk/utils/lit/tests/discovery.py (added)
+++ llvm/trunk/utils/lit/tests/discovery.py Wed Jan 30 18:21:51 2013
@@ -0,0 +1,25 @@
+# Check the basic discovery process, including a sub-suite.
+#
+# RUN: %{lit} %{inputs}/discovery \
+# RUN:   -j 1 --debug --no-execute --show-suites -v > %t.out 2> %t.err
+# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
+# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
+#
+# CHECK-BASIC-ERR: loading suite config '{{.*}}/tests/Inputs/discovery/lit.cfg'
+# CHECK-BASIC-ERR: loading local config '{{.*}}/tests/Inputs/discovery/subdir/lit.local.cfg'
+# CHECK-BASIC-ERR: loading suite config '{{.*}}/tests/Inputs/discovery/subsuite/lit.cfg'
+#
+# CHECK-BASIC-OUT: -- Test Suites --
+# CHECK-BASIC-OUT:   sub-suite - 2 tests
+# CHECK-BASIC-OUT:     Source Root:
+# CHECK-BASIC-OUT:     Exec Root  :
+# CHECK-BASIC-OUT:   top-level-suite - 3 tests
+# CHECK-BASIC-OUT:     Source Root:
+# CHECK-BASIC-OUT:     Exec Root  :
+#
+# CHECK-BASIC-OUT: -- Testing: 5 tests, 1 threads --
+# CHECK-BASIC-OUT: PASS: sub-suite :: test-one
+# CHECK-BASIC-OUT: PASS: sub-suite :: test-two
+# CHECK-BASIC-OUT: PASS: top-level-suite :: subdir/test-three
+# CHECK-BASIC-OUT: PASS: top-level-suite :: test-one
+# CHECK-BASIC-OUT: PASS: top-level-suite :: test-two





More information about the llvm-commits mailing list