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
This commit is contained in:
Guillaume Gomez 2023-02-22 10:35:09 +01:00 committed by GitHub
commit 8fd47a614b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -435,6 +435,10 @@ fn run(self, builder: &Builder<'_>) {
&[], &[],
); );
if !builder.fail_fast {
cargo.arg("--no-fail-fast");
}
let dir = testdir(builder, compiler.host); let dir = testdir(builder, compiler.host);
t!(fs::create_dir_all(&dir)); t!(fs::create_dir_all(&dir));
cargo.env("RUSTFMT_TEST_DIR", dir); cargo.env("RUSTFMT_TEST_DIR", dir);
@ -615,6 +619,10 @@ fn run(self, builder: &Builder<'_>) {
); );
cargo.add_rustc_lib_path(builder, compiler); 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 // miri tests need to know about the stage sysroot
cargo.env("MIRI_SYSROOT", &miri_sysroot); cargo.env("MIRI_SYSROOT", &miri_sysroot);
cargo.env("MIRI_HOST_SYSROOT", sysroot); cargo.env("MIRI_HOST_SYSROOT", sysroot);
@ -746,6 +754,10 @@ fn run(self, builder: &Builder<'_>) {
&[], &[],
); );
if !builder.fail_fast {
cargo.arg("--no-fail-fast");
}
cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler));
cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler)); cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
let host_libs = builder.stage_out(compiler, Mode::ToolRustc).join(builder.cargo_dir()); let host_libs = builder.stage_out(compiler, Mode::ToolRustc).join(builder.cargo_dir());