Skip to content

Commit 8998024

Browse files
committed
Correct test-args to compiletest on Windows
1 parent 468887e commit 8998024

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/bootstrap/test.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,15 @@ note: if you're sure you want to do this, please open an issue as to why. In the
15141514

15151515
test_args.append(&mut builder.config.cmd.test_args());
15161516

1517-
cmd.args(&test_args);
1517+
// On Windows, replace forward slashes in test-args by backslashes
1518+
// so the correct filters are passed to libtest
1519+
if cfg!(windows) {
1520+
let test_args_win: Vec<String> =
1521+
test_args.iter().map(|s| s.replace("/", "\\")).collect();
1522+
cmd.args(&test_args_win);
1523+
} else {
1524+
cmd.args(&test_args);
1525+
}
15181526

15191527
if builder.is_verbose() {
15201528
cmd.arg("--verbose");

0 commit comments

Comments
 (0)