llvm.org GIT mirror llvm / abb9de5
[lit] Change --show-{tests,suites} to exit after printing. - This is a more sensible behavior than printing and also running tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188009 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 6 years ago
3 changed file(s) with 14 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
148148
149149 .. option:: --show-suites
150150
151 List the discovered test suites as part of the standard output.
151 List the discovered test suites and exit.
152
153 .. option:: --show-tests
154
155 List all of the the discovered tests and exit.
152156
153157 EXIT STATUS
154158 -----------
310310 ts_tests.sort(key = lambda test: test.path_in_suite)
311311 for test in ts_tests:
312312 print(' %s' % (test.getFullName(),))
313
313
314 # Exit.
315 sys.exit(0)
316
314317 # Select and order the tests.
315318 numTotalTests = len(tests)
316319
0 # Check the basic discovery process, including a sub-suite.
11 #
22 # RUN: %{lit} %{inputs}/discovery \
3 # RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \
3 # RUN: -j 1 --debug --show-tests --show-suites \
44 # RUN: -v > %t.out 2> %t.err
55 # RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
66 # RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
2323 # CHECK-BASIC-OUT: top-level-suite :: subdir/test-three
2424 # CHECK-BASIC-OUT: top-level-suite :: test-one
2525 # CHECK-BASIC-OUT: top-level-suite :: test-two
26 # CHECK-BASIC-OUT: -- Testing: 0
2726
2827
2928 # Check discovery when exact test names are given.
3130 # RUN: %{lit} \
3231 # RUN: %{inputs}/discovery/subdir/test-three.py \
3332 # RUN: %{inputs}/discovery/subsuite/test-one.txt \
34 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
33 # RUN: -j 1 --show-tests --show-suites -v > %t.out
3534 # RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s
3635 #
3736 # CHECK-EXACT-TEST: -- Available Tests --
3837 # CHECK-EXACT-TEST: sub-suite :: test-one
3938 # CHECK-EXACT-TEST: top-level-suite :: subdir/test-three
40 # CHECK-EXACT-TEST: -- Testing: 0
4139
4240
4341 # Check discovery when using an exec path.
4442 #
4543 # RUN: %{lit} %{inputs}/exec-discovery \
46 # RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \
44 # RUN: -j 1 --debug --show-tests --show-suites \
4745 # RUN: -v > %t.out 2> %t.err
4846 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s
4947 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s
6967 # CHECK-ASEXEC-OUT: top-level-suite :: subdir/test-three
7068 # CHECK-ASEXEC-OUT: top-level-suite :: test-one
7169 # CHECK-ASEXEC-OUT: top-level-suite :: test-two
72 # CHECK-ASEXEC-OUT: -- Testing: 0
7370
7471 # Check discovery when exact test names are given.
7572 #
7774 #
7875 # RUN: %{lit} \
7976 # RUN: %{inputs}/exec-discovery/subdir/test-three.py \
80 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
77 # RUN: -j 1 --show-tests --show-suites -v > %t.out
8178 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s
8279 #
8380 # CHECK-ASEXEC-EXACT-TEST: -- Available Tests --
8481 # CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three
85 # CHECK-ASEXEC-EXACT-TEST: -- Testing: 0
8682
8783
8884 # Check that we don't recurse infinitely when loading an site specific test
9086 #
9187 # RUN: %{lit} \
9288 # RUN: %{inputs}/exec-discovery-in-tree/obj/ \
93 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out
89 # RUN: -j 1 --show-tests --show-suites -v > %t.out
9490 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
9591 #
9692 # CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests
9894 # CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*/exec-discovery-in-tree/obj$}}
9995 # CHECK-ASEXEC-INTREE-NEXT: -- Available Tests --
10096 # CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one
101 # CHECK-ASEXEC-INTREE: -- Testing: 0