|
1 | 1 | # RUN: %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-BASIC %s
|
2 | 2 | # CHECK-BASIC: Testing: 5 tests
|
3 | 3 |
|
| 4 | + |
| 5 | +# Check that we exit with an error if we do not discover any tests, even with --allow-empty-runs. |
| 6 | +# |
| 7 | +# RUN: not %{lit} %{inputs}/nonexistent 2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s |
| 8 | +# RUN: not %{lit} %{inputs}/nonexistent --allow-empty-runs 2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s |
| 9 | +# CHECK-BAD-PATH: Did not disover any tests for provided path(s). |
| 10 | + |
| 11 | +# Check that we exit with an error if we filter out all tests, but allow it with --allow-empty-runs. |
| 12 | +# |
| 13 | +# RUN: not %{lit} --filter 'nonexistent' %{inputs}/discovery 2>&1 | FileCheck --check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ERROR %s |
| 14 | +# RUN: %{lit} --filter 'nonexistent' --allow-empty-runs %{inputs}/discovery 2>&1 | FileCheck --check-prefixes=CHECK-BAD-FILTER,CHECK-BAD-FILTER-ALLOW %s |
| 15 | +# CHECK-BAD-FILTER: Filter did not match any tests (of 5 discovered). |
| 16 | +# CHECK-BAD-FILTER-ERROR: Use '--allow-empty-runs' to suppress this error. |
| 17 | +# CHECK-BAD-FILTER-ALLOW: Suppressing error because '--allow-empty-runs' was specified. |
| 18 | + |
4 | 19 | # Check that regex-filtering works, is case-insensitive, and can be configured via env var.
|
5 | 20 | #
|
6 | 21 | # RUN: %{lit} --filter 'o[a-z]e' %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s
|
7 | 22 | # RUN: %{lit} --filter 'O[A-Z]E' %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s
|
8 | 23 | # RUN: env LIT_FILTER='o[a-z]e' %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s
|
9 | 24 | # CHECK-FILTER: Testing: 2 of 5 tests
|
10 | 25 |
|
| 26 | + |
11 | 27 | # Check that maximum counts work
|
12 | 28 | #
|
13 | 29 | # RUN: %{lit} --max-tests 3 %{inputs}/discovery | FileCheck --check-prefix=CHECK-MAX %s
|
|
68 | 84 | #
|
69 | 85 | # RUN: %{lit} --num-shards 100 --run-shard 6 %{inputs}/discovery >%t.out 2>%t.err
|
70 | 86 | # RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-ERR2 < %t.err %s
|
71 |
| -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-OUT2 < %t.out %s |
72 | 87 | # CHECK-SHARD-BIG-ERR2: note: Selecting shard 6/100 = size 0/5 = tests #(100*k)+6 = []
|
73 |
| -# CHECK-SHARD-BIG-OUT2: Testing: 0 of 5 tests |
| 88 | +# CHECK-SHARD-BIG-ERR2: Shard does not contain any tests. Consider decreasing the number of shards. |
74 | 89 | #
|
75 | 90 | # RUN: %{lit} --num-shards 100 --run-shard 50 %{inputs}/discovery >%t.out 2>%t.err
|
76 | 91 | # RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-ERR3 < %t.err %s
|
77 |
| -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-OUT3 < %t.out %s |
78 | 92 | # CHECK-SHARD-BIG-ERR3: note: Selecting shard 50/100 = size 0/5 = tests #(100*k)+50 = []
|
79 |
| -# CHECK-SHARD-BIG-OUT3: Testing: 0 of 5 tests |
| 93 | +# CHECK-SHARD-BIG-ERR3: Shard does not contain any tests. Consider decreasing the number of shards. |
80 | 94 |
|
81 | 95 |
|
82 | 96 | # Check that range constraints are enforced
|
|
0 commit comments