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 --max-tests 0 \ 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 # CHECK-BASIC-OUT: -- Testing: 0 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 \ 35 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out 36 # RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s 37 # 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 42 43 44 # Check discovery when using an exec path. 45 # 46 # RUN: %{lit} %{inputs}/exec-discovery \ 47 # RUN: -j 1 --debug --show-tests --show-suites --max-tests 0 \ 48 # RUN: -v > %t.out 2> %t.err 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 # 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 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 \ 81 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out 82 # RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s 83 # 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 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/ \ 94 # RUN: -j 1 --show-tests --show-suites --max-tests 0 -v > %t.out 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$}} 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 103