[llvm] r188009 - [lit] Change --show-{tests, suites} to exit after printing.
Daniel Dunbar
daniel at zuster.org
Thu Aug 8 13:59:25 PDT 2013
Author: ddunbar
Date: Thu Aug 8 15:59:25 2013
New Revision: 188009
URL: http://llvm.org/viewvc/llvm-project?rev=188009&view=rev
Log:
[lit] Change --show-{tests,suites} to exit after printing.
- This is a more sensible behavior than printing and also running tests.
Modified:
llvm/trunk/docs/CommandGuide/lit.rst
llvm/trunk/utils/lit/lit/main.py
llvm/trunk/utils/lit/tests/discovery.py
Modified: llvm/trunk/docs/CommandGuide/lit.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/lit.rst?rev=188009&r1=188008&r2=188009&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/lit.rst (original)
+++ llvm/trunk/docs/CommandGuide/lit.rst Thu Aug 8 15:59:25 2013
@@ -149,7 +149,11 @@ ADDITIONAL OPTIONS
.. option:: --show-suites
- List the discovered test suites as part of the standard output.
+ List the discovered test suites and exit.
+
+.. option:: --show-tests
+
+ List all of the the discovered tests and exit.
EXIT STATUS
-----------
Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=188009&r1=188008&r2=188009&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Thu Aug 8 15:59:25 2013
@@ -311,7 +311,10 @@ def main(builtinParameters = {}):
ts_tests.sort(key = lambda test: test.path_in_suite)
for test in ts_tests:
print(' %s' % (test.getFullName(),))
-
+
+ # Exit.
+ sys.exit(0)
+
# Select and order the tests.
numTotalTests = len(tests)
Modified: llvm/trunk/utils/lit/tests/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/discovery.py?rev=188009&r1=188008&r2=188009&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/discovery.py (original)
+++ llvm/trunk/utils/lit/tests/discovery.py Thu Aug 8 15:59:25 2013
@@ -1,7 +1,7 @@
# Check the basic discovery process, including a sub-suite.
#
# RUN: %{lit} %{inputs}/discovery \
-# RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \
+# RUN: -j 1 --debug --show-tests --show-suites \
# RUN: -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
@@ -24,7 +24,6 @@
# CHECK-BASIC-OUT: top-level-suite :: subdir/test-three
# CHECK-BASIC-OUT: top-level-suite :: test-one
# CHECK-BASIC-OUT: top-level-suite :: test-two
-# CHECK-BASIC-OUT: -- Testing: 0
# Check discovery when exact test names are given.
@@ -32,19 +31,18 @@
# RUN: %{lit} \
# RUN: %{inputs}/discovery/subdir/test-three.py \
# RUN: %{inputs}/discovery/subsuite/test-one.txt \
-# RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
+# RUN: -j 1 --show-tests --show-suites -v > %t.out
# RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s
#
# CHECK-EXACT-TEST: -- Available Tests --
# CHECK-EXACT-TEST: sub-suite :: test-one
# CHECK-EXACT-TEST: top-level-suite :: subdir/test-three
-# CHECK-EXACT-TEST: -- Testing: 0
# Check discovery when using an exec path.
#
# RUN: %{lit} %{inputs}/exec-discovery \
-# RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \
+# RUN: -j 1 --debug --show-tests --show-suites \
# RUN: -v > %t.out 2> %t.err
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s
@@ -70,7 +68,6 @@
# CHECK-ASEXEC-OUT: top-level-suite :: subdir/test-three
# CHECK-ASEXEC-OUT: top-level-suite :: test-one
# CHECK-ASEXEC-OUT: top-level-suite :: test-two
-# CHECK-ASEXEC-OUT: -- Testing: 0
# Check discovery when exact test names are given.
#
@@ -78,12 +75,11 @@
#
# RUN: %{lit} \
# RUN: %{inputs}/exec-discovery/subdir/test-three.py \
-# RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
+# RUN: -j 1 --show-tests --show-suites -v > %t.out
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s
#
# CHECK-ASEXEC-EXACT-TEST: -- Available Tests --
# CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three
-# CHECK-ASEXEC-EXACT-TEST: -- Testing: 0
# Check that we don't recurse infinitely when loading an site specific test
@@ -91,7 +87,7 @@
#
# RUN: %{lit} \
# RUN: %{inputs}/exec-discovery-in-tree/obj/ \
-# RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
+# RUN: -j 1 --show-tests --show-suites -v > %t.out
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
#
# CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests
@@ -99,4 +95,3 @@
# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*/exec-discovery-in-tree/obj$}}
# CHECK-ASEXEC-INTREE-NEXT: -- Available Tests --
# CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one
-# CHECK-ASEXEC-INTREE: -- Testing: 0
More information about the llvm-commits
mailing list