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.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/discovery.py b/llvm/utils/lit/tests/discovery.py
index 7d71436b0fe..ba5247337a8 100644
--- a/llvm/utils/lit/tests/discovery.py
+++ b/llvm/utils/lit/tests/discovery.py
@@ -38,6 +38,34 @@
# CHECK-EXACT-TEST: sub-suite :: test-one
# CHECK-EXACT-TEST: top-level-suite :: subdir/test-three
+# Check discovery when config files end in .py
+# RUN: %{lit} %{inputs}/py-config-discovery \
+# RUN: -j 1 --debug --show-tests --show-suites \
+# RUN: -v > %t.out 2> %t.err
+# RUN: FileCheck --check-prefix=CHECK-PYCONFIG-OUT < %t.out %s
+# RUN: FileCheck --check-prefix=CHECK-PYCONFIG-ERR < %t.err %s
+#
+# CHECK-PYCONFIG-ERR: loading suite config '{{.*(/|\\\\)py-config-discovery(/|\\\\)lit.site.cfg.py}}'
+# CHECK-PYCONFIG-ERR: load_config from '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}'
+# CHECK-PYCONFIG-ERR: loaded config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}'
+# CHECK-PYCONFIG-ERR: loaded config '{{.*(/|\\\\)py-config-discovery(/|\\\\)lit.site.cfg.py}}'
+# CHECK-PYCONFIG-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}'
+# CHECK-PYCONFIG-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}'
+#
+# CHECK-PYCONFIG-OUT: -- Test Suites --
+# CHECK-PYCONFIG-OUT: sub-suite - 2 tests
+# CHECK-PYCONFIG-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}}
+# CHECK-PYCONFIG-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}}
+# CHECK-PYCONFIG-OUT: top-level-suite - 3 tests
+# CHECK-PYCONFIG-OUT: Source Root: {{.*[/\\]discovery$}}
+# CHECK-PYCONFIG-OUT: Exec Root : {{.*[/\\]py-config-discovery$}}
+#
+# CHECK-PYCONFIG-OUT: -- Available Tests --
+# CHECK-PYCONFIG-OUT: sub-suite :: test-one
+# CHECK-PYCONFIG-OUT: sub-suite :: test-two
+# CHECK-PYCONFIG-OUT: top-level-suite :: subdir/test-three
+# CHECK-PYCONFIG-OUT: top-level-suite :: test-one
+# CHECK-PYCONFIG-OUT: top-level-suite :: test-two
# Check discovery when using an exec path.
#
OpenPOWER on IntegriCloud