about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-02-22 10:35:09 +0100
committerGitHub <noreply@github.com>2023-02-22 10:35:09 +0100
commit8fd47a614b34faca40d2b5b70165831e2a8b8593 (patch)
treeed2f0e7a8f71aa8abff3f42ef9e84a0ea9e1d0f4
parent4658210565a81e0da5fbb172b817ec257abfc542 (diff)
parent2f163554866e1b4b348811e9df6a4a753beb0abf (diff)
downloadrust-8fd47a614b34faca40d2b5b70165831e2a8b8593.tar.gz
rust-8fd47a614b34faca40d2b5b70165831e2a8b8593.zip
Rollup merge of #108264 - jchecahi:tool-testsuite-ignores-no-fail-fast, r=ozkanonur
no-fail-fast support for tool testsuites

~~This commit adds a change to pass "--no-fail-fast" flag to `cargo test` inside `tool::prepare_tool_cargo()` so there is no need to do it manually in each `Step` trait implementation in src/bootstrap/test.rs.~~

~~Also, removes the flag from test.rs where prepare_tool_cargo() is called so cargo doesn't complain because the flag has been passed twice.~~

This commit adds `--no-fail-fast` flag to each `cargo test`
command in each tool Step trait implementation (`miri`, `rustfmt` and `clippy`).

Fixes #108261
-rw-r--r--src/bootstrap/test.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 9cd6107b43a..b4f1506dc8f 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -435,6 +435,10 @@ impl Step for Rustfmt {
             &[],
         );
 
+        if !builder.fail_fast {
+            cargo.arg("--no-fail-fast");
+        }
+
         let dir = testdir(builder, compiler.host);
         t!(fs::create_dir_all(&dir));
         cargo.env("RUSTFMT_TEST_DIR", dir);
@@ -615,6 +619,10 @@ impl Step for Miri {
         );
         cargo.add_rustc_lib_path(builder, compiler);
 
+        if !builder.fail_fast {
+            cargo.arg("--no-fail-fast");
+        }
+
         // miri tests need to know about the stage sysroot
         cargo.env("MIRI_SYSROOT", &miri_sysroot);
         cargo.env("MIRI_HOST_SYSROOT", sysroot);
@@ -746,6 +754,10 @@ impl Step for Clippy {
             &[],
         );
 
+        if !builder.fail_fast {
+            cargo.arg("--no-fail-fast");
+        }
+
         cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler));
         cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
         let host_libs = builder.stage_out(compiler, Mode::ToolRustc).join(builder.cargo_dir());