blob: 28010894cda629bde45a7d02f9021eec620b7ef8 [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 \
Daniel Dunbarc4477df2013-08-08 20:59:25 +00004# RUN: -j 1 --debug --show-tests --show-suites \
Daniel Dunbar668c61f2013-08-07 03:12:51 +00005# RUN: -v > %t.out 2> %t.err
Daniel Dunbarf74e41a2013-01-31 00:21:51 +00006# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
7# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
8#
Daniel Dunbarb5e97272013-04-12 19:08:57 +00009# 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 Dunbarf74e41a2013-01-31 00:21:51 +000012#
13# CHECK-BASIC-OUT: -- Test Suites --
14# CHECK-BASIC-OUT: sub-suite - 2 tests
Daniel Dunbarb5e97272013-04-12 19:08:57 +000015# CHECK-BASIC-OUT: Source Root: {{.*/discovery/subsuite$}}
16# CHECK-BASIC-OUT: Exec Root : {{.*/discovery/subsuite$}}
Daniel Dunbarf74e41a2013-01-31 00:21:51 +000017# CHECK-BASIC-OUT: top-level-suite - 3 tests
Daniel Dunbarb5e97272013-04-12 19:08:57 +000018# CHECK-BASIC-OUT: Source Root: {{.*/discovery$}}
19# CHECK-BASIC-OUT: Exec Root : {{.*/discovery$}}
Daniel Dunbarf74e41a2013-01-31 00:21:51 +000020#
Daniel Dunbar668c61f2013-08-07 03:12:51 +000021# 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 Dunbar970faff2013-04-11 00:31:22 +000027
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 Dunbarc4477df2013-08-08 20:59:25 +000034# RUN: -j 1 --show-tests --show-suites -v > %t.out
Daniel Dunbar970faff2013-04-11 00:31:22 +000035# RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s
36#
Daniel Dunbar668c61f2013-08-07 03:12:51 +000037# CHECK-EXACT-TEST: -- Available Tests --
38# CHECK-EXACT-TEST: sub-suite :: test-one
39# CHECK-EXACT-TEST: top-level-suite :: subdir/test-three
Daniel Dunbar970faff2013-04-11 00:31:22 +000040
41
Daniel Dunbarb5e97272013-04-12 19:08:57 +000042# Check discovery when using an exec path.
43#
44# RUN: %{lit} %{inputs}/exec-discovery \
Daniel Dunbarc4477df2013-08-08 20:59:25 +000045# RUN: -j 1 --debug --show-tests --show-suites \
Daniel Dunbar668c61f2013-08-07 03:12:51 +000046# RUN: -v > %t.out 2> %t.err
Daniel Dunbarb5e97272013-04-12 19:08:57 +000047# 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 Dunbar668c61f2013-08-07 03:12:51 +000065# 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 Dunbarb5e97272013-04-12 19:08:57 +000071
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 Dunbarc4477df2013-08-08 20:59:25 +000078# RUN: -j 1 --show-tests --show-suites -v > %t.out
Daniel Dunbarb5e97272013-04-12 19:08:57 +000079# RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s
80#
Daniel Dunbar668c61f2013-08-07 03:12:51 +000081# CHECK-ASEXEC-EXACT-TEST: -- Available Tests --
82# CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three
Daniel Dunbar175aed52013-04-12 19:09:09 +000083
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 Dunbarc4477df2013-08-08 20:59:25 +000090# RUN: -j 1 --show-tests --show-suites -v > %t.out
Daniel Dunbar175aed52013-04-12 19:09:09 +000091# 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 Dunbar668c61f2013-08-07 03:12:51 +000096# CHECK-ASEXEC-INTREE-NEXT: -- Available Tests --
97# CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one