Skip to content

Commit

Permalink
Rollup merge of #108264 - jchecahi:tool-testsuite-ignores-no-fail-fas…
Browse files Browse the repository at this point in the history
…t, 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
  • Loading branch information
GuillaumeGomez authored Feb 22, 2023
2 parents 4658210 + 2f16355 commit 8fd47a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 8fd47a6

Please sign in to comment.