Skip to content

Commit

Permalink
Correct test-args to compiletest on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
czzrr committed Aug 21, 2022
1 parent 468887e commit 8998024
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,15 @@ note: if you're sure you want to do this, please open an issue as to why. In the

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

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

if builder.is_verbose() {
cmd.arg("--verbose");
Expand Down

0 comments on commit 8998024

Please sign in to comment.