summaryrefslogtreecommitdiffstats
path: root/src/bootstrap/test.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bootstrap/test.rs25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 6078e39ac..b4f1506dc 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());
@@ -1114,9 +1126,6 @@ impl Step for Tidy {
cmd.arg("--bless");
}
- builder.info("tidy check");
- try_run(builder, &mut cmd);
-
if builder.config.channel == "dev" || builder.config.channel == "nightly" {
builder.info("fmt check");
if builder.initial_rustfmt().is_none() {
@@ -1134,6 +1143,11 @@ help: to skip test's attempt to check tidiness, pass `--exclude src/tools/tidy`
}
crate::format::format(&builder, !builder.config.cmd.bless(), &[]);
}
+
+ builder.info("tidy check");
+ try_run(builder, &mut cmd);
+
+ builder.ensure(ExpandYamlAnchors {});
}
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -1508,6 +1522,10 @@ note: if you're sure you want to do this, please open an issue as to why. In the
if builder.config.rust_optimize_tests {
cmd.arg("--optimize-tests");
}
+ if builder.config.cmd.only_modified() {
+ cmd.arg("--only-modified");
+ }
+
let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
flags.push(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
flags.extend(builder.config.cmd.rustc_args().iter().map(|s| s.to_string()));
@@ -1582,6 +1600,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
.collect();
test_args.append(&mut builder.config.cmd.test_args());
+ test_args.extend(builder.config.free_args.iter().map(|s| s.as_str()));
// On Windows, replace forward slashes in test-args by backslashes
// so the correct filters are passed to libtest