about summary refs log tree commit diff
diff options
context:
space:
mode:
authorczzrr <chriz@live.dk>2022-08-19 22:14:36 +0200
committerczzrr <chriz@live.dk>2022-08-21 19:13:03 +0200
commit8998024aa388b1d15992133b98fadba1047e4bfe (patch)
tree3c5a33c9ed52827905c8f0f73a80dfda87b0ac8a
parent468887ef91e46847dff57b6b234cff0fad17cb71 (diff)
downloadrust-8998024aa388b1d15992133b98fadba1047e4bfe.tar.gz
rust-8998024aa388b1d15992133b98fadba1047e4bfe.zip
Correct test-args to compiletest on Windows
-rw-r--r--src/bootstrap/test.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index baad0c75295..c759d9b88e2 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -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");