Skip to content

Commit 46a1737

Browse files
committed
[windows] Use both directory separators in test patterns.
Admit defeat and realize that one simply cannot win against Windows. Use the pattern with both separators in the tests and remove the hack in PathSanitizingFileCheck because it created false positives, some of them could not have been easily fixed. Sadly lit substitutions or other tricks in lit.cfg will not work, because CHECK lines are not processed by lit, but by FileCheck.
1 parent 7351b40 commit 46a1737

File tree

6 files changed

+41
-62
lines changed

6 files changed

+41
-62
lines changed

test/ParseableInterface/swift_build_sdk_interfaces/find-modules.test-sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/mock-sdk/ -v -n -o %t/output > %
22
RUN: %FileCheck %s < %t.txt
33
RUN: %FileCheck -check-prefix NEGATIVE %s < %t.txt
44

5-
CHECK-DAG: System/Library/Frameworks/Simple.framework/Modules/Simple.swiftmodule/xyz.swiftinterface -o {{.+}}output/Simple.swiftmodule/xyz.swiftmodule
6-
CHECK-DAG: usr/lib/swift/Flat.swiftinterface -o {{.+}}output/Flat.swiftmodule
7-
CHECK-DAG: usr/lib/swift/Normal.swiftmodule/xyz.swiftinterface -o {{.+}}output/Normal.swiftmodule/xyz.swiftmodule
8-
CHECK-DAG: System/iOSSupport/System/Library/Frameworks/Simple.framework/Modules/Simple.swiftmodule/xyzzy.swiftinterface -o {{.+}}output/Simple.swiftmodule/xyzzy.swiftmodule
9-
CHECK-DAG: System/iOSSupport/usr/lib/swift/Caramel.swiftmodule/xyz.swiftinterface -o {{.+}}output/Caramel.swiftmodule/xyz.swiftmodule
5+
CHECK-DAG: System/Library/Frameworks{{\\|/}}Simple.framework{{\\|/}}Modules{{\\|/}}Simple.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Simple.swiftmodule{{\\|/}}xyz.swiftmodule
6+
CHECK-DAG: usr/lib/swift{{\\|/}}Flat.swiftinterface -o {{.+}}output{{\\|/}}Flat.swiftmodule
7+
CHECK-DAG: usr/lib/swift{{\\|/}}Normal.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Normal.swiftmodule{{\\|/}}xyz.swiftmodule
8+
CHECK-DAG: System/iOSSupport/System/Library/Frameworks{{\\|/}}Simple.framework{{\\|/}}Modules{{\\|/}}Simple.swiftmodule{{\\|/}}xyzzy.swiftinterface -o {{.+}}output{{\\|/}}Simple.swiftmodule{{\\|/}}xyzzy.swiftmodule
9+
CHECK-DAG: System/iOSSupport/usr/lib/swift{{\\|/}}Caramel.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Caramel.swiftmodule{{\\|/}}xyz.swiftmodule
1010

1111
NEGATIVE-NOT: BAD
1212

@@ -23,9 +23,9 @@ RUN: touch %t/sdk/usr/lib/swift/Swift.swiftmodule/def.swiftinterface
2323
RUN: %swift_build_sdk_interfaces -sdk %t/sdk -v -n -o %t/output | %FileCheck -check-prefix CHECK-WITH-STDLIB %s
2424

2525
CHECK-WITH-STDLIB-NOT: .swiftinterface -o
26-
CHECK-WITH-STDLIB: Swift.swiftmodule/{{abc|def}}.swiftinterface -o
26+
CHECK-WITH-STDLIB: Swift.swiftmodule{{\\|/}}{{abc|def}}.swiftinterface -o
2727
CHECK-WITH-STDLIB-NOT: .swiftinterface -o
28-
CHECK-WITH-STDLIB: Swift.swiftmodule/{{abc|def}}.swiftinterface -o
28+
CHECK-WITH-STDLIB: Swift.swiftmodule{{\\|/}}{{abc|def}}.swiftinterface -o
2929
CHECK-WITH-STDLIB: .swiftinterface -o
3030

3131
# ...unless we pass -skip-stdlib.
@@ -41,14 +41,14 @@ RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/mock-sdk/ -v -n -o %t/output Sys
4141
RUN: %FileCheck -check-prefix CHECK-CUSTOM-PATHS %s < %t.txt
4242
RUN: %FileCheck -check-prefix NEGATIVE-CUSTOM-PATHS %s < %t.txt
4343

44-
CHECK-CUSTOM-PATHS-DAG: System/Library/PrivateFrameworks/PrivateSimple.framework/Modules/PrivateSimple.swiftmodule/xyz.swiftinterface -o {{.+}}output/PrivateSimple.swiftmodule/xyz.swiftmodule
45-
CHECK-CUSTOM-PATHS-DAG: usr/lib/swift/Flat.swiftinterface -o {{.+}}output/Flat.swiftmodule
46-
CHECK-CUSTOM-PATHS-DAG: usr/lib/swift/Normal.swiftmodule/xyz.swiftinterface -o {{.+}}output/Normal.swiftmodule/xyz.swiftmodule
47-
CHECK-CUSTOM-PATHS-DAG: System/iOSSupport/usr/lib/swift/Caramel.swiftmodule/xyz.swiftinterface -o {{.+}}output/Caramel.swiftmodule/xyz.swiftmodule
44+
CHECK-CUSTOM-PATHS-DAG: System/Library/PrivateFrameworks{{\\|/}}PrivateSimple.framework{{\\|/}}Modules{{\\|/}}PrivateSimple.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}PrivateSimple.swiftmodule{{\\|/}}xyz.swiftmodule
45+
CHECK-CUSTOM-PATHS-DAG: usr/lib/swift{{\\|/}}Flat.swiftinterface -o {{.+}}output{{\\|/}}Flat.swiftmodule
46+
CHECK-CUSTOM-PATHS-DAG: usr/lib/swift{{\\|/}}Normal.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Normal.swiftmodule{{\\|/}}xyz.swiftmodule
47+
CHECK-CUSTOM-PATHS-DAG: System/iOSSupport/usr/lib/swift{{\\|/}}Caramel.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Caramel.swiftmodule{{\\|/}}xyz.swiftmodule
4848
NEGATIVE-CUSTOM-PATHS-NOT: System/Library/Frameworks/
4949

5050
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/mock-sdk/ -v -n -o %t/output System/Library/Frameworks System/Library/PrivateFrameworks > %t.txt
5151
RUN: %FileCheck -check-prefix CHECK-CUSTOM-PATHS -check-prefix CHECK-NORMAL-PATHS %s < %t.txt
5252
RUN: %FileCheck -check-prefix NEGATIVE %s < %t.txt
5353

54-
CHECK-NORMAL-PATHS-DAG: System/Library/Frameworks/Simple.framework/Modules/Simple.swiftmodule/xyz.swiftinterface -o {{.+}}output/Simple.swiftmodule/xyz.swiftmodule
54+
CHECK-NORMAL-PATHS-DAG: System/Library/Frameworks{{\\|/}}Simple.framework{{\\|/}}Modules{{\\|/}}Simple.swiftmodule{{\\|/}}xyz.swiftinterface -o {{.+}}output{{\\|/}}Simple.swiftmodule{{\\|/}}xyz.swiftmodule

test/ParseableInterface/swift_build_sdk_interfaces/ignore-non-stdlib-failures.test-sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output | %FileCheck %s
22

3-
CHECK-DAG: # (FAIL) {{.+}}/Bad.swiftinterface
4-
CHECK-DAG: # (PASS) {{.+}}/Good.swiftinterface
3+
CHECK-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
4+
CHECK-DAG: # (PASS) {{.+}}{{\\|/}}Good.swiftinterface
55

66
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -ignore-non-stdlib-failures | %FileCheck -check-prefix=CHECK-IGNORING-FAILURES %s
77

8-
CHECK-IGNORING-FAILURES-DAG: # (XFAIL) {{.+}}/Bad.swiftinterface
9-
CHECK-IGNORING-FAILURES-DAG: # (UPASS) {{.+}}/Good.swiftinterface
8+
CHECK-IGNORING-FAILURES-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
9+
CHECK-IGNORING-FAILURES-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
1010

1111
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/broken-stdlib-sdk/ -v -o %t/output | %FileCheck -check-prefix CHECK-BROKEN-STDLIB %s
1212
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/broken-stdlib-sdk/ -v -o %t/output -ignore-non-stdlib-failures | %FileCheck -check-prefix CHECK-BROKEN-STDLIB %s
1313

14-
CHECK-BROKEN-STDLIB: # (FAIL) {{.+}}/Swift.swiftinterface
14+
CHECK-BROKEN-STDLIB: # (FAIL) {{.+}}{{\\|/}}Swift.swiftinterface
1515
CHECK-BROKEN-STDLIB-NOT: {{^}}#
1616

1717
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/broken-stdlib-sdk/ -v -o %t/output -skip-stdlib | %FileCheck %s

test/ParseableInterface/swift_build_sdk_interfaces/iosmac.test-sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/iosmac-sdk/MacOSX.sdk/ -Fsystem-
22
RUN: %FileCheck %s < %t.txt
33
RUN: %FileCheck -check-prefix NEGATIVE %s < %t.txt
44

5-
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks/FMWK.framework/Modules/FMWK.swiftmodule/x86_64.swiftinterface -o {{.+}}/output/FMWK.swiftmodule/x86_64-apple-macos.swiftmodule
6-
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System/iOSSupport/System/Library/Frameworks {{.+}}MacOSX.sdk/System/iOSSupport/System/Library/Frameworks/FMWK.framework/Modules/FMWK.swiftmodule/x86_64.swiftinterface -o {{.+}}/output/FMWK.swiftmodule/x86_64-apple-ios-macabi.swiftmodule
7-
CHECK-DAG: MacOSX.sdk/usr/lib/swift/Foo.swiftmodule/x86_64.swiftinterface -o {{.+}}output/Foo.swiftmodule/x86_64-apple-macos.swiftmodule
8-
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System/iOSSupport/System/Library/Frameworks {{.+}}MacOSX.sdk/System/iOSSupport/usr/lib/swift/Foo.swiftmodule/x86_64.swiftinterface -o {{.+}}output/Foo.swiftmodule/x86_64-apple-ios-macabi.swiftmodule
9-
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks/Zippered.framework/Modules/Zippered.swiftmodule/x86_64.swiftinterface -o {{.+}}/output/Zippered.swiftmodule/x86_64-apple-macos.swiftmodule
10-
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks/Zippered.framework/Modules/Zippered.swiftmodule/x86_64-apple-macos.swiftinterface -o {{.+}}/output/Zippered.swiftmodule/x86_64-apple-macos.swiftmodule
11-
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System/iOSSupport/System/Library/Frameworks {{.+}}MacOSX.sdk/System/Library/Frameworks/Zippered.framework/Modules/Zippered.swiftmodule/x86_64-apple-ios-macabi.swiftinterface -o {{.+}}/output/Zippered.swiftmodule/x86_64-apple-ios-macabi.swiftmodule
5+
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks{{\\|/}}FMWK.framework{{\\|/}}Modules{{\\|/}}FMWK.swiftmodule{{\\|/}}x86_64.swiftinterface -o {{.+}}/output{{\\|/}}FMWK.swiftmodule{{\\|/}}x86_64-apple-macos.swiftmodule
6+
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System{{\\|/}}iOSSupport{{\\|/}}System{{\\|/}}Library{{\\|/}}Frameworks {{.+}}MacOSX.sdk/System/iOSSupport/System/Library/Frameworks{{\\|/}}FMWK.framework{{\\|/}}Modules{{\\|/}}FMWK.swiftmodule{{\\|/}}x86_64.swiftinterface -o {{.+}}/output{{\\|/}}FMWK.swiftmodule{{\\|/}}x86_64-apple-ios-macabi.swiftmodule
7+
CHECK-DAG: MacOSX.sdk/usr/lib/swift{{\\|/}}Foo.swiftmodule{{\\|/}}x86_64.swiftinterface -o {{.+}}output{{\\|/}}Foo.swiftmodule{{\\|/}}x86_64-apple-macos.swiftmodule
8+
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System{{\\|/}}iOSSupport{{\\|/}}System{{\\|/}}Library{{\\|/}}Frameworks {{.+}}MacOSX.sdk/System/iOSSupport/usr/lib/swift{{\\|/}}Foo.swiftmodule{{\\|/}}x86_64.swiftinterface -o {{.+}}output{{\\|/}}Foo.swiftmodule{{\\|/}}x86_64-apple-ios-macabi.swiftmodule
9+
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks{{\\|/}}Zippered.framework{{\\|/}}Modules{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64.swiftinterface -o {{.+}}/output{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64-apple-macos.swiftmodule
10+
CHECK-DAG: MacOSX.sdk/System/Library/Frameworks{{\\|/}}Zippered.framework{{\\|/}}Modules{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64-apple-macos.swiftinterface -o {{.+}}/output{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64-apple-macos.swiftmodule
11+
CHECK-DAG: -Fsystem SECRET_SEARCH_PATH -Fsystem {{.+}}MacOSX.sdk/System{{\\|/}}iOSSupport{{\\|/}}System{{\\|/}}Library{{\\|/}}Frameworks {{.+}}MacOSX.sdk/System/Library/Frameworks{{\\|/}}Zippered.framework{{\\|/}}Modules{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64-apple-ios-macabi.swiftinterface -o {{.+}}/output{{\\|/}}Zippered.swiftmodule{{\\|/}}x86_64-apple-ios-macabi.swiftmodule
1212

1313
NEGATIVE-NOT: iOSSupport{{.+}}{{macos|x86_64}}.swiftmodule
1414
NEGATIVE-NOT: SECRET_SEARCH_PATH{{.+}}{{macos|x86_64}}.swiftmodule

test/ParseableInterface/swift_build_sdk_interfaces/xfail-logs.test-sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ RUN: %empty-directory(%t)
22
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -log-path %t/logs | %FileCheck %s
33
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/logs/Bad-Bad-err.txt
44

5-
CHECK: # (FAIL) {{.+}}/Bad.swiftinterface
5+
CHECK: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
66

77
PRINTS-ERROR: unresolved identifier 'garbage'
88

@@ -11,26 +11,26 @@ RUN: echo '["Good"]' > %t/xfails-good.json
1111
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -log-path %t/logs -xfails %t/xfails-good.json | %FileCheck -check-prefix=CHECK-XFAIL-GOOD %s
1212
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/logs/Bad-Bad-err.txt
1313

14-
CHECK-XFAIL-GOOD-DAG: # (FAIL) {{.+}}/Bad.swiftinterface
15-
CHECK-XFAIL-GOOD-DAG: # (UPASS) {{.+}}/Good.swiftinterface
14+
CHECK-XFAIL-GOOD-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
15+
CHECK-XFAIL-GOOD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
1616

1717
RUN: %empty-directory(%t)
1818
RUN: echo '["Good", "Bad"]' > %t/xfails-good-and-bad.json
1919
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -log-path %t/logs -xfails %t/xfails-good-and-bad.json| %FileCheck -check-prefix=CHECK-XFAIL-GOOD-AND-BAD %s
2020
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/logs/Bad-Bad-err.txt
2121

22-
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (XFAIL) {{.+}}/Bad.swiftinterface
23-
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (UPASS) {{.+}}/Good.swiftinterface
22+
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
23+
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
2424

2525
RUN: %empty-directory(%t)
2626
RUN: echo '["Bad"]' > %t/xfails-bad.json
2727
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -log-path %t/logs -xfails %t/xfails-bad.json | %FileCheck -check-prefix=CHECK-XFAIL-BAD %s
2828
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/logs/Bad-Bad-err.txt
2929

30-
CHECK-XFAIL-BAD: # (XFAIL) {{.+}}/Bad.swiftinterface
30+
CHECK-XFAIL-BAD: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
3131

3232
RUN: %empty-directory(%t)
3333
RUN: not %swift_build_sdk_interfaces -sdk %t -o %t/output -log-path %t/logs %S/Inputs/xfail-logs-framework/ | %FileCheck -check-prefix=CHECK-FRAMEWORK %s
3434
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/logs/BadFMWK-x86_64-apple-macos-err.txt
3535

36-
CHECK-FRAMEWORK: # (FAIL) {{.+}}/BadFMWK.swiftmodule/x86_64-apple-macos.swiftinterface
36+
CHECK-FRAMEWORK: # (FAIL) {{.+}}{{\\|/}}BadFMWK.swiftmodule{{\\|/}}x86_64-apple-macos.swiftinterface

test/ParseableInterface/swift_build_sdk_interfaces/xfails.test-sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
44
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output 2> %t/stderr.txt | %FileCheck -check-prefix CHECK-VERBOSE %s
55
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
66

7-
CHECK: # (FAIL) {{.+}}/Bad.swiftinterface
8-
CHECK-VERBOSE-DAG: # (FAIL) {{.+}}/Bad.swiftinterface
9-
CHECK-VERBOSE-DAG: # (PASS) {{.+}}/Good.swiftinterface
7+
CHECK: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
8+
CHECK-VERBOSE-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
9+
CHECK-VERBOSE-DAG: # (PASS) {{.+}}{{\\|/}}Good.swiftinterface
1010

1111
PRINTS-ERROR: unresolved identifier 'garbage'
1212
HIDES-ERROR-NOT: unresolved identifier 'garbage'
@@ -18,8 +18,8 @@ RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
1818
RUN: not %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-good.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD %s
1919
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
2020

21-
CHECK-XFAIL-GOOD-DAG: # (FAIL) {{.+}}/Bad.swiftinterface
22-
CHECK-XFAIL-GOOD-DAG: # (UPASS) {{.+}}/Good.swiftinterface
21+
CHECK-XFAIL-GOOD-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
22+
CHECK-XFAIL-GOOD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
2323

2424
RUN: %empty-directory(%t)
2525
RUN: echo '["Good", "Bad"]' > %t/xfails-good-and-bad.json
@@ -28,8 +28,8 @@ RUN: %FileCheck -check-prefix HIDES-ERROR -allow-empty %s < %t/stderr.txt
2828
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-good-and-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD-AND-BAD %s
2929
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
3030

31-
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (XFAIL) {{.+}}/Bad.swiftinterface
32-
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (UPASS) {{.+}}/Good.swiftinterface
31+
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
32+
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
3333

3434
RUN: %empty-directory(%t)
3535
RUN: echo '["Bad"]' > %t/xfails-bad.json
@@ -38,6 +38,6 @@ RUN: %FileCheck -check-prefix HIDES-ERROR -allow-empty %s < %t/stderr.txt
3838
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-BAD-VERBOSE %s
3939
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
4040

41-
CHECK-XFAIL-BAD: # (XFAIL) {{.+}}/Bad.swiftinterface
42-
CHECK-XFAIL-BAD-VERBOSE-DAG: # (XFAIL) {{.+}}/Bad.swiftinterface
43-
CHECK-XFAIL-BAD-VERBOSE-DAG: # (PASS) {{.+}}/Good.swiftinterface
41+
CHECK-XFAIL-BAD: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
42+
CHECK-XFAIL-BAD-VERBOSE-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
43+
CHECK-XFAIL-BAD-VERBOSE-DAG: # (PASS) {{.+}}{{\\|/}}Good.swiftinterface

utils/PathSanitizingFileCheck

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,6 @@ constants.""")
6868

6969
stdin = sys.stdin.read()
7070

71-
if args.enable_windows_compatibility:
72-
# Let's look for paths in the output, and try to transform them to use
73-
# Unix directory separators to be automatically picked up by the tests.
74-
# This only picks up absolute paths, but those should be the more
75-
# common in the tools output and the easier to detect without false
76-
# positives.
77-
78-
def replace_slashes(matchobj):
79-
return re.sub(r'\\\\|\\', r'/', matchobj.group(0))
80-
81-
# The regex is composed of three parts:
82-
# Matches a drive letter followed by a slash (backward
83-
# escaped, simple backward, or forward)
84-
stdin = re.sub(r'\b[a-zA-Z]:(?:\\\\|\\|\/)' +
85-
# Matches the path part, it always ends up in a slash.
86-
r'(?:[-a-zA-Z0-9_.]+(?:\\\\|\\|\/))*' +
87-
# Matches the last path component, which do not has a
88-
# trailing slash, but it is optional.
89-
r'(?:[-a-zA-Z0-9_.]+)?\b',
90-
replace_slashes, stdin)
91-
9271
for s in args.sanitize_strings:
9372
replacement, pattern = s.split('=', 1)
9473
# We are replacing the Unix path separators in the paths passed as

0 commit comments

Comments
 (0)