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