summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests/discovery.py
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/lit/tests/discovery.py')
-rw-r--r--llvm/utils/lit/tests/discovery.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/discovery.py b/llvm/utils/lit/tests/discovery.py
index ba5247337a8..41a2d6cad3d 100644
--- a/llvm/utils/lit/tests/discovery.py
+++ b/llvm/utils/lit/tests/discovery.py
@@ -25,6 +25,28 @@
# CHECK-BASIC-OUT: top-level-suite :: test-one
# CHECK-BASIC-OUT: top-level-suite :: test-two
+# Check discovery when providing the special builtin 'config_map'
+# RUN: %{python} %{inputs}/config-map-discovery/driver.py \
+# RUN: %{inputs}/config-map-discovery/main-config/lit.cfg \
+# RUN: %{inputs}/config-map-discovery/lit.alt.cfg \
+# RUN: --single-process --debug --show-tests --show-suites > %t.out 2> %t.err
+# RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-OUT < %t.out %s
+# RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-ERR < %t.err %s
+
+# CHECK-CONFIG-MAP-OUT-NOT: ERROR: lit.cfg invoked
+# CHECK-CONFIG-MAP-OUT: -- Test Suites --
+# CHECK-CONFIG-MAP-OUT: config-map - 2 tests
+# CHECK-CONFIG-MAP-OUT: Source Root: {{.*[/\\]config-map-discovery[/\\]tests}}
+# CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]inputs[/\\]config-map-discovery}}
+# CHECK-CONFIG-MAP-OUT: -- Available Tests --
+# CHECK-CONFIG-MAP-OUT-NOT: invalid-test.txt
+# CHECK-CONFIG-MAP-OUT: config-map :: test1.txt
+# CHECK-CONFIG-MAP-OUT: config-map :: test2.txt
+
+# CHECK-CONFIG-MAP-ERR: loading suite config '{{.*}}lit.alt.cfg'
+# CHECK-CONFIG-MAP-ERR: loaded config '{{.*}}lit.alt.cfg'
+# CHECK-CONFIG-MAP-ERR: resolved input '{{.*config-map-discovery[/\\]main-config}}' to 'config-map'::()
+
# Check discovery when exact test names are given.
#
OpenPOWER on IntegriCloud