blob: 56d9dd07e841ddfb9c40ca8575a568ce55dc46d6 [file] [log] [blame]
Daniel Dunbarf74e41a2013-01-31 00:21:51 +00001# Check the basic discovery process, including a sub-suite.
2#
3# RUN: %{lit} %{inputs}/discovery \
4# RUN: -j 1 --debug --no-execute --show-suites -v > %t.out 2> %t.err
5# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
6# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
7#
Daniel Dunbarb5e97272013-04-12 19:08:57 +00008# CHECK-BASIC-ERR: loading suite config '{{.*}}/discovery/lit.cfg'
9# CHECK-BASIC-ERR: loading local config '{{.*}}/discovery/subdir/lit.local.cfg'
10# CHECK-BASIC-ERR: loading suite config '{{.*}}/discovery/subsuite/lit.cfg'
Daniel Dunbarf74e41a2013-01-31 00:21:51 +000011#
12# CHECK-BASIC-OUT: -- Test Suites --
13# CHECK-BASIC-OUT: sub-suite - 2 tests
Daniel Dunbarb5e97272013-04-12 19:08:57 +000014# CHECK-BASIC-OUT: Source Root: {{.*/discovery/subsuite$}}
15# CHECK-BASIC-OUT: Exec Root : {{.*/discovery/subsuite$}}
Daniel Dunbarf74e41a2013-01-31 00:21:51 +000016# CHECK-BASIC-OUT: top-level-suite - 3 tests
Daniel Dunbarb5e97272013-04-12 19:08:57 +000017# CHECK-BASIC-OUT: Source Root: {{.*/discovery$}}
18# CHECK-BASIC-OUT: Exec Root : {{.*/discovery$}}
Daniel Dunbarf74e41a2013-01-31 00:21:51 +000019#
20# CHECK-BASIC-OUT: -- Testing: 5 tests, 1 threads --
21# CHECK-BASIC-OUT: PASS: sub-suite :: test-one
22# CHECK-BASIC-OUT: PASS: sub-suite :: test-two
23# CHECK-BASIC-OUT: PASS: top-level-suite :: subdir/test-three
24# CHECK-BASIC-OUT: PASS: top-level-suite :: test-one
25# CHECK-BASIC-OUT: PASS: top-level-suite :: test-two
Daniel Dunbar970faff2013-04-11 00:31:22 +000026
27
28# Check discovery when exact test names are given.
29#
30# RUN: %{lit} \
31# RUN: %{inputs}/discovery/subdir/test-three.py \
32# RUN: %{inputs}/discovery/subsuite/test-one.txt \
33# RUN: -j 1 --no-execute --show-suites -v > %t.out
34# RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s
35#
36# CHECK-EXACT-TEST: -- Testing: 2 tests, 1 threads --
37# CHECK-EXACT-TEST: PASS: sub-suite :: test-one
38# CHECK-EXACT-TEST: PASS: top-level-suite :: subdir/test-three
39
40
Daniel Dunbarb5e97272013-04-12 19:08:57 +000041# Check discovery when using an exec path.
42#
43# RUN: %{lit} %{inputs}/exec-discovery \
44# RUN: -j 1 --debug --no-execute --show-suites -v > %t.out 2> %t.err
45# RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s
46# RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s
47#
48# CHECK-ASEXEC-ERR: loading suite config '{{.*}}/exec-discovery/lit.site.cfg'
49# CHECK-ASEXEC-ERR: load_config from '{{.*}}/discovery/lit.cfg'
50# CHECK-ASEXEC-ERR: loaded config '{{.*}}/discovery/lit.cfg'
51# CHECK-ASEXEC-ERR: loaded config '{{.*}}/exec-discovery/lit.site.cfg'
52# CHECK-ASEXEC-ERR: loading local config '{{.*}}/discovery/subdir/lit.local.cfg'
53# CHECK-ASEXEC-ERR: loading suite config '{{.*}}/discovery/subsuite/lit.cfg'
54#
55# CHECK-ASEXEC-OUT: -- Test Suites --
56# CHECK-ASEXEC-OUT: sub-suite - 2 tests
57# CHECK-ASEXEC-OUT: Source Root: {{.*/discovery/subsuite$}}
58# CHECK-ASEXEC-OUT: Exec Root : {{.*/discovery/subsuite$}}
59# CHECK-ASEXEC-OUT: top-level-suite - 3 tests
60# CHECK-ASEXEC-OUT: Source Root: {{.*/discovery$}}
61# CHECK-ASEXEC-OUT: Exec Root : {{.*/exec-discovery$}}
62#
63# CHECK-ASEXEC-OUT: -- Testing: 5 tests, 1 threads --
64# CHECK-ASEXEC-OUT: PASS: sub-suite :: test-one
65# CHECK-ASEXEC-OUT: PASS: sub-suite :: test-two
66# CHECK-ASEXEC-OUT: PASS: top-level-suite :: subdir/test-three
67# CHECK-ASEXEC-OUT: PASS: top-level-suite :: test-one
68# CHECK-ASEXEC-OUT: PASS: top-level-suite :: test-two
69
70
71# Check discovery when exact test names are given.
72#
73# FIXME: Note that using a path into a subsuite doesn't work correctly here.
74#
75# RUN: %{lit} \
76# RUN: %{inputs}/exec-discovery/subdir/test-three.py \
77# RUN: -j 1 --no-execute --show-suites -v > %t.out
78# RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s
79#
80# CHECK-ASEXEC-EXACT-TEST: -- Testing: 1 tests, 1 threads --
81# CHECK-ASEXEC-EXACT-TEST: PASS: top-level-suite :: subdir/test-three
Daniel Dunbar175aed52013-04-12 19:09:09 +000082
83
84# Check that we don't recurse infinitely when loading an site specific test
85# suite located inside the test source root.
86#
87# RUN: %{lit} \
88# RUN: %{inputs}/exec-discovery-in-tree/obj/ \
89# RUN: -j 1 --no-execute --show-suites -v > %t.out
90# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
91#
92# CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests
93# CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*/exec-discovery-in-tree$}}
94# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*/exec-discovery-in-tree/obj$}}
95# CHECK-ASEXEC-INTREE-NEXT: -- Testing: 1 tests, 1 threads --
96# CHECK-ASEXEC-INTREE-NEXT: PASS: exec-discovery-in-tree-suite :: test-one