Skip to content

Commit 8fd47a6

Browse files
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
2 parents 4658210 + 2f16355 commit 8fd47a6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/bootstrap/test.rs

+12
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ impl Step for Rustfmt {
435435
&[],
436436
);
437437

438+
if !builder.fail_fast {
439+
cargo.arg("--no-fail-fast");
440+
}
441+
438442
let dir = testdir(builder, compiler.host);
439443
t!(fs::create_dir_all(&dir));
440444
cargo.env("RUSTFMT_TEST_DIR", dir);
@@ -615,6 +619,10 @@ impl Step for Miri {
615619
);
616620
cargo.add_rustc_lib_path(builder, compiler);
617621

622+
if !builder.fail_fast {
623+
cargo.arg("--no-fail-fast");
624+
}
625+
618626
// miri tests need to know about the stage sysroot
619627
cargo.env("MIRI_SYSROOT", &miri_sysroot);
620628
cargo.env("MIRI_HOST_SYSROOT", sysroot);
@@ -746,6 +754,10 @@ impl Step for Clippy {
746754
&[],
747755
);
748756

757+
if !builder.fail_fast {
758+
cargo.arg("--no-fail-fast");
759+
}
760+
749761
cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler));
750762
cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
751763
let host_libs = builder.stage_out(compiler, Mode::ToolRustc).join(builder.cargo_dir());

0 commit comments

Comments
 (0)