Skip to content

Commit ccf6cf7

Browse files
committed
test: accommodate path separators in CAS tests
Adjust the test expectations to account for path separators on Windows.
1 parent d9b8dfd commit ccf6cf7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

test/CAS/block-list.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd
1313
// RUN: %FileCheck %s -check-prefix CMD -input-file=%t/A.cmd
1414
// CMD: -blocklist-file
15-
// CMD-NEXT: /^tmp/blocklist.yml
15+
// CMD-NEXT: /^tmp{{/|\\}}blocklist.yml
1616
// CMD-NEXT: -blocklist-file
17-
// CMD-NEXT: /^tmp/empty.yml
17+
// CMD-NEXT: /^tmp{{/|\\}}empty.yml
1818

1919
// RUN: %{python} %S/Inputs/SwiftDepsExtractor.py %t/deps.json Test casFSRootID > %t/fs.casid
2020
// DISABLE: llvm-cas --cas %t/cas --ls-tree-recursive @%t/fs.casid | %FileCheck %s -check-prefix FS

test/CAS/cached_diagnostics_remap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
// RUN: -O -cas-path %t/cas @%t/MyApp.cmd \
3838
// RUN: -emit-module -o %t/test.swiftmodule /^test/test.swift -cache-replay-prefix-map /^test %t 2>&1 | %FileCheck %s --check-prefix REMAP
3939

40-
// BRIDGE: /^test/objc.h:3:2: warning: warning in bridging header
40+
// BRIDGE: {{/|\\}}^test{{/|\\}}objc.h:3:2: warning: warning in bridging header
4141
// BRIDGE-REMAP: TMP_DIR{{/|\\}}objc.h:3:2: warning: warning in bridging header
42-
// CHECK: /^test/test.swift:1:10: warning: this is a warning
42+
// CHECK: {{/|\\}}^test{{/|\\}}test.swift:1:10: warning: this is a warning
4343
// REMAP: TMP_DIR{{/|\\}}test.swift:1:10: warning: this is a warning
4444

4545
//--- test.swift

test/CAS/macro_plugin_external.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-include-tree-list @%t/fs.casid | %FileCheck %s --check-prefix=FS-REMAP -DLIB=%target-library-name(MacroDefinition)
5151

5252
/// CASFS is remapped.
53-
// FS-REMAP: /^test/plugins/[[LIB]]
53+
// FS-REMAP: /^test{{/|\\}}plugins{{/|\\}}[[LIB]]
5454

5555
// RUN: %{python} %S/../../utils/swift-build-modules.py --cas %t/cas %swift_frontend_plain %t/deps2.json -o %t/MyApp2.cmd
5656

@@ -59,7 +59,7 @@
5959

6060
// CMD-REMAP: -resolved-plugin-verification
6161
// CMD-REMAP-NEXT: -load-resolved-plugin
62-
// CMD-REMAP-NEXT: /^test/plugins/[[LIB]]#/^bin/swift-plugin-server#MacroDefinition
62+
// CMD-REMAP-NEXT: /^test{{/|\\}}plugins{{/|\\}}[[LIB]]#/^bin{{/|\\}}swift-plugin-server#MacroDefinition
6363

6464
// RUN: %target-swift-frontend-plain \
6565
// RUN: -emit-module -o %t/Macro.swiftmodule -cache-compile-job -cas-path %t/cas \
@@ -74,7 +74,7 @@
7474
/// Encoded PLUGIN_SEARCH_OPTION is remapped.
7575
// RUN: llvm-bcanalyzer -dump %t/Macro.swiftmodule | %FileCheck %s --check-prefix=MOD -DLIB=%target-library-name(MacroDefinition)
7676

77-
// MOD: <PLUGIN_SEARCH_OPTION abbrevid=7 op0=4/> blob data = '/^test/plugins/[[LIB]]#/^bin/swift-plugin-server#MacroDefinition'
77+
// MOD: <PLUGIN_SEARCH_OPTION abbrevid=7 op0=4/> blob data = '/^test{{/|\\}}plugins{{/|\\}}[[LIB]]#/^bin{{/|\\}}swift-plugin-server#MacroDefinition'
7878

7979
/// Cache hit has no macro-loading remarks because no macro is actually loaded and the path might not be correct due to different mapping.
8080
// RUN: %target-swift-frontend-plain \

0 commit comments

Comments
 (0)