1 # Check the basic discovery process, including a sub-suite. 2 # 3 # RUN: %{lit} %{inputs}/discovery \ 4 # RUN: -j 1 --debug --show-tests --show-suites \ 5 # RUN: -v > %t.out 2> %t.err 6 # RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s 7 # RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s 8 # 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' 12 # 13 # CHECK-BASIC-OUT: -- Test Suites -- 14 # CHECK-BASIC-OUT: sub-suite - 2 tests 15 # CHECK-BASIC-OUT: Source Root: {{.*/discovery/subsuite$}} 16 # CHECK-BASIC-OUT: Exec Root : {{.*/discovery/subsuite$}} 17 # CHECK-BASIC-OUT: top-level-suite - 3 tests 18 # CHECK-BASIC-OUT: Source Root: {{.*/discovery$}} 19 # CHECK-BASIC-OUT: Exec Root : {{.*/discovery$}} 20 # 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 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 \ 34 # RUN: -j 1 --show-tests --show-suites -v > %t.out 35 # RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s 36 # 37 # CHECK-EXACT-TEST: -- Available Tests -- 38 # CHECK-EXACT-TEST: sub-suite :: test-one 39 # CHECK-EXACT-TEST: top-level-suite :: subdir/test-three 40 41 42 # Check discovery when using an exec path. 43 # 44 # RUN: %{lit} %{inputs}/exec-discovery \ 45 # RUN: -j 1 --debug --show-tests --show-suites \ 46 # RUN: -v > %t.out 2> %t.err 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 # 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 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 \ 78 # RUN: -j 1 --show-tests --show-suites -v > %t.out 79 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s 80 # 81 # CHECK-ASEXEC-EXACT-TEST: -- Available Tests -- 82 # CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three 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/ \ 90 # RUN: -j 1 --show-tests --show-suites -v > %t.out 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$}} 96 # CHECK-ASEXEC-INTREE-NEXT: -- Available Tests -- 97 # CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one 98