Skip to content

Commit 6687af5

Browse files
dcharkesCommit Queue
authored andcommitted
[pkv/vm] Add package config to --depfile test fix 2
Depfiles escape backslashes with backslashes to be able to encode spaces in paths. And they have backslashes on windows and forward slashes on the other platforms. Change the test to only check for the directory and file names, not the path separators. TEST=pkg/vm/test/kernel_front_end_test.dart Change-Id: I15927d036fa07fe0a03a6d2340a241453f777794 Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398901 Reviewed-by: Derek Xu <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent 8696660 commit 6687af5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/vm/test/kernel_front_end_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ main() {
184184
]);
185185
expect(
186186
File(outputDepfile()).readAsStringSync(),
187-
stringContainsInOrder('$sdkDir/$packageConfigFile'.split('/')),
187+
stringContainsInOrder(
188+
// Don't check for any path separators to avoid having to deal with
189+
// different slashes and back-slash escaping.
190+
'$sdkDir/$packageConfigFile'.replaceAll(r'\', '/').split('/'),
191+
),
188192
);
189193
},
190194
timeout: Timeout.none,

0 commit comments

Comments
 (0)