summaryrefslogtreecommitdiff
path: root/utils/lit/tests
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-26 22:00:38 +0000
committerReid Kleckner <rnk@google.com>2017-07-26 22:00:38 +0000
commit1dc238e090e354c97ab2392e3e383c4a0fe2f85c (patch)
treed95841e028a9af85d289b9a13cfdbdfa8f46fce6 /utils/lit/tests
parentcdd1a9849d4e096fb4c6eb4d791bea954c766bad (diff)
[lit] Fix discovery.py on Windows by matching backslashes when necessary
Fixes PR33932 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit/tests')
-rw-r--r--utils/lit/tests/discovery.py41
1 files changed, 19 insertions, 22 deletions
diff --git a/utils/lit/tests/discovery.py b/utils/lit/tests/discovery.py
index ab25a0eadab..3eea320ccfb 100644
--- a/utils/lit/tests/discovery.py
+++ b/utils/lit/tests/discovery.py
@@ -1,25 +1,22 @@
# Check the basic discovery process, including a sub-suite.
#
-# PR33932
-# XFAIL: windows
-#
# RUN: %{lit} %{inputs}/discovery \
# RUN: -j 1 --debug --show-tests --show-suites \
# RUN: -v > %t.out 2> %t.err
# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
#
-# CHECK-BASIC-ERR: loading suite config '{{.*}}/discovery/lit.cfg'
-# CHECK-BASIC-ERR-DAG: loading suite config '{{.*}}/discovery/subsuite/lit.cfg'
-# CHECK-BASIC-ERR-DAG: loading local config '{{.*}}/discovery/subdir/lit.local.cfg'
+# CHECK-BASIC-ERR: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}'
+# CHECK-BASIC-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}'
+# CHECK-BASIC-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}'
#
# CHECK-BASIC-OUT: -- Test Suites --
# CHECK-BASIC-OUT: sub-suite - 2 tests
-# CHECK-BASIC-OUT: Source Root: {{.*/discovery/subsuite$}}
-# CHECK-BASIC-OUT: Exec Root : {{.*/discovery/subsuite$}}
+# CHECK-BASIC-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}}
+# CHECK-BASIC-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}}
# CHECK-BASIC-OUT: top-level-suite - 3 tests
-# CHECK-BASIC-OUT: Source Root: {{.*/discovery$}}
-# CHECK-BASIC-OUT: Exec Root : {{.*/discovery$}}
+# CHECK-BASIC-OUT: Source Root: {{.*[/\\]discovery$}}
+# CHECK-BASIC-OUT: Exec Root : {{.*[/\\]discovery$}}
#
# CHECK-BASIC-OUT: -- Available Tests --
# CHECK-BASIC-OUT: sub-suite :: test-one
@@ -50,20 +47,20 @@
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s
#
-# CHECK-ASEXEC-ERR: loading suite config '{{.*}}/exec-discovery/lit.site.cfg'
-# CHECK-ASEXEC-ERR: load_config from '{{.*}}/discovery/lit.cfg'
-# CHECK-ASEXEC-ERR: loaded config '{{.*}}/discovery/lit.cfg'
-# CHECK-ASEXEC-ERR: loaded config '{{.*}}/exec-discovery/lit.site.cfg'
-# CHECK-ASEXEC-ERR-DAG: loading suite config '{{.*}}/discovery/subsuite/lit.cfg'
-# CHECK-ASEXEC-ERR-DAG: loading local config '{{.*}}/discovery/subdir/lit.local.cfg'
+# CHECK-ASEXEC-ERR: loading suite config '{{.*(/|\\\\)exec-discovery(/|\\\\)lit.site.cfg}}'
+# CHECK-ASEXEC-ERR: load_config from '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}'
+# CHECK-ASEXEC-ERR: loaded config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}'
+# CHECK-ASEXEC-ERR: loaded config '{{.*(/|\\\\)exec-discovery(/|\\\\)lit.site.cfg}}'
+# CHECK-ASEXEC-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}'
+# CHECK-ASEXEC-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}'
#
# CHECK-ASEXEC-OUT: -- Test Suites --
# CHECK-ASEXEC-OUT: sub-suite - 2 tests
-# CHECK-ASEXEC-OUT: Source Root: {{.*/discovery/subsuite$}}
-# CHECK-ASEXEC-OUT: Exec Root : {{.*/discovery/subsuite$}}
+# CHECK-ASEXEC-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}}
+# CHECK-ASEXEC-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}}
# CHECK-ASEXEC-OUT: top-level-suite - 3 tests
-# CHECK-ASEXEC-OUT: Source Root: {{.*/discovery$}}
-# CHECK-ASEXEC-OUT: Exec Root : {{.*/exec-discovery$}}
+# CHECK-ASEXEC-OUT: Source Root: {{.*[/\\]discovery$}}
+# CHECK-ASEXEC-OUT: Exec Root : {{.*[/\\]exec-discovery$}}
#
# CHECK-ASEXEC-OUT: -- Available Tests --
# CHECK-ASEXEC-OUT: sub-suite :: test-one
@@ -94,7 +91,7 @@
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
#
# CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests
-# CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*/exec-discovery-in-tree$}}
-# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*/exec-discovery-in-tree/obj$}}
+# CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*[/\\]exec-discovery-in-tree$}}
+# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*[/\\]exec-discovery-in-tree[/\\]obj$}}
# CHECK-ASEXEC-INTREE-NEXT: -- Available Tests --
# CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one