Daniel Dunbar | f74e41a | 2013-01-31 00:21:51 +0000 | [diff] [blame] | 1 | # Check the basic discovery process, including a sub-suite. |
| 2 | # |
| 3 | # RUN: %{lit} %{inputs}/discovery \ |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 4 | # RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \ |
| 5 | # RUN: -v > %t.out 2> %t.err |
Daniel Dunbar | f74e41a | 2013-01-31 00:21:51 +0000 | [diff] [blame] | 6 | # RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s |
| 7 | # RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s |
| 8 | # |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 9 | # CHECK-BASIC-ERR: loading suite config '{{.*}}/discovery/lit.cfg' |
| 10 | # CHECK-BASIC-ERR: loading local config '{{.*}}/discovery/subdir/lit.local.cfg' |
| 11 | # CHECK-BASIC-ERR: loading suite config '{{.*}}/discovery/subsuite/lit.cfg' |
Daniel Dunbar | f74e41a | 2013-01-31 00:21:51 +0000 | [diff] [blame] | 12 | # |
| 13 | # CHECK-BASIC-OUT: -- Test Suites -- |
| 14 | # CHECK-BASIC-OUT: sub-suite - 2 tests |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 15 | # CHECK-BASIC-OUT: Source Root: {{.*/discovery/subsuite$}} |
| 16 | # CHECK-BASIC-OUT: Exec Root : {{.*/discovery/subsuite$}} |
Daniel Dunbar | f74e41a | 2013-01-31 00:21:51 +0000 | [diff] [blame] | 17 | # CHECK-BASIC-OUT: top-level-suite - 3 tests |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 18 | # CHECK-BASIC-OUT: Source Root: {{.*/discovery$}} |
| 19 | # CHECK-BASIC-OUT: Exec Root : {{.*/discovery$}} |
Daniel Dunbar | f74e41a | 2013-01-31 00:21:51 +0000 | [diff] [blame] | 20 | # |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 21 | # CHECK-BASIC-OUT: -- Available Tests -- |
| 22 | # CHECK-BASIC-OUT: sub-suite :: test-one |
| 23 | # CHECK-BASIC-OUT: sub-suite :: test-two |
| 24 | # CHECK-BASIC-OUT: top-level-suite :: subdir/test-three |
| 25 | # CHECK-BASIC-OUT: top-level-suite :: test-one |
| 26 | # CHECK-BASIC-OUT: top-level-suite :: test-two |
| 27 | # CHECK-BASIC-OUT: -- Testing: 0 |
Daniel Dunbar | 970faff | 2013-04-11 00:31:22 +0000 | [diff] [blame] | 28 | |
| 29 | |
| 30 | # Check discovery when exact test names are given. |
| 31 | # |
| 32 | # RUN: %{lit} \ |
| 33 | # RUN: %{inputs}/discovery/subdir/test-three.py \ |
| 34 | # RUN: %{inputs}/discovery/subsuite/test-one.txt \ |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 35 | # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out |
Daniel Dunbar | 970faff | 2013-04-11 00:31:22 +0000 | [diff] [blame] | 36 | # RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s |
| 37 | # |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 38 | # CHECK-EXACT-TEST: -- Available Tests -- |
| 39 | # CHECK-EXACT-TEST: sub-suite :: test-one |
| 40 | # CHECK-EXACT-TEST: top-level-suite :: subdir/test-three |
| 41 | # CHECK-EXACT-TEST: -- Testing: 0 |
Daniel Dunbar | 970faff | 2013-04-11 00:31:22 +0000 | [diff] [blame] | 42 | |
| 43 | |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 44 | # Check discovery when using an exec path. |
| 45 | # |
| 46 | # RUN: %{lit} %{inputs}/exec-discovery \ |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 47 | # RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \ |
| 48 | # RUN: -v > %t.out 2> %t.err |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 49 | # RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s |
| 50 | # RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s |
| 51 | # |
| 52 | # CHECK-ASEXEC-ERR: loading suite config '{{.*}}/exec-discovery/lit.site.cfg' |
| 53 | # CHECK-ASEXEC-ERR: load_config from '{{.*}}/discovery/lit.cfg' |
| 54 | # CHECK-ASEXEC-ERR: loaded config '{{.*}}/discovery/lit.cfg' |
| 55 | # CHECK-ASEXEC-ERR: loaded config '{{.*}}/exec-discovery/lit.site.cfg' |
| 56 | # CHECK-ASEXEC-ERR: loading local config '{{.*}}/discovery/subdir/lit.local.cfg' |
| 57 | # CHECK-ASEXEC-ERR: loading suite config '{{.*}}/discovery/subsuite/lit.cfg' |
| 58 | # |
| 59 | # CHECK-ASEXEC-OUT: -- Test Suites -- |
| 60 | # CHECK-ASEXEC-OUT: sub-suite - 2 tests |
| 61 | # CHECK-ASEXEC-OUT: Source Root: {{.*/discovery/subsuite$}} |
| 62 | # CHECK-ASEXEC-OUT: Exec Root : {{.*/discovery/subsuite$}} |
| 63 | # CHECK-ASEXEC-OUT: top-level-suite - 3 tests |
| 64 | # CHECK-ASEXEC-OUT: Source Root: {{.*/discovery$}} |
| 65 | # CHECK-ASEXEC-OUT: Exec Root : {{.*/exec-discovery$}} |
| 66 | # |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 67 | # CHECK-ASEXEC-OUT: -- Available Tests -- |
| 68 | # CHECK-ASEXEC-OUT: sub-suite :: test-one |
| 69 | # CHECK-ASEXEC-OUT: sub-suite :: test-two |
| 70 | # CHECK-ASEXEC-OUT: top-level-suite :: subdir/test-three |
| 71 | # CHECK-ASEXEC-OUT: top-level-suite :: test-one |
| 72 | # CHECK-ASEXEC-OUT: top-level-suite :: test-two |
| 73 | # CHECK-ASEXEC-OUT: -- Testing: 0 |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 74 | |
| 75 | # Check discovery when exact test names are given. |
| 76 | # |
| 77 | # FIXME: Note that using a path into a subsuite doesn't work correctly here. |
| 78 | # |
| 79 | # RUN: %{lit} \ |
| 80 | # RUN: %{inputs}/exec-discovery/subdir/test-three.py \ |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 81 | # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out |
Daniel Dunbar | b5e9727 | 2013-04-12 19:08:57 +0000 | [diff] [blame] | 82 | # RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s |
| 83 | # |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 84 | # CHECK-ASEXEC-EXACT-TEST: -- Available Tests -- |
| 85 | # CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three |
| 86 | # CHECK-ASEXEC-EXACT-TEST: -- Testing: 0 |
Daniel Dunbar | 175aed5 | 2013-04-12 19:09:09 +0000 | [diff] [blame] | 87 | |
| 88 | |
| 89 | # Check that we don't recurse infinitely when loading an site specific test |
| 90 | # suite located inside the test source root. |
| 91 | # |
| 92 | # RUN: %{lit} \ |
| 93 | # RUN: %{inputs}/exec-discovery-in-tree/obj/ \ |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 94 | # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out |
Daniel Dunbar | 175aed5 | 2013-04-12 19:09:09 +0000 | [diff] [blame] | 95 | # RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s |
| 96 | # |
| 97 | # CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests |
| 98 | # CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*/exec-discovery-in-tree$}} |
| 99 | # CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*/exec-discovery-in-tree/obj$}} |
Daniel Dunbar | 668c61f | 2013-08-07 03:12:51 +0000 | [diff] [blame^] | 100 | # CHECK-ASEXEC-INTREE-NEXT: -- Available Tests -- |
| 101 | # CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one |
| 102 | # CHECK-ASEXEC-INTREE: -- Testing: 0 |