From 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:50 +0200 Subject: Merging upstream version 1.69.0+dfsg1. Signed-off-by: Daniel Baumann --- src/bootstrap/test.rs | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/bootstrap/test.rs') 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 -- cgit v1.2.3