Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aee3dc4

Browse files
committedJul 22, 2024
Auto merge of rust-lang#128056 - jieyouxu:rollup-zb1y27e, r=jieyouxu
Rollup of 8 pull requests Successful merges: - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127415 (Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in) - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - rust-lang#127996 (Clean up warnings + `unsafe_op_in_unsafe_fn` when building std for armv6k-nintendo-3ds) - rust-lang#128035 (Add test for rust-lang#125837) - rust-lang#128054 (mw triagebot vacation) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ae7b1c1 + c4c0ca4 commit aee3dc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2736
-604
lines changed
 

‎src/bootstrap/src/core/build_steps/clippy.rs

+1
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,5 @@ lint_any!(
326326
Rustfmt, "src/tools/rustfmt", "rustfmt";
327327
RustInstaller, "src/tools/rust-installer", "rust-installer";
328328
Tidy, "src/tools/tidy", "tidy";
329+
TestFloatParse, "src/etc/test-float-parse", "test-float-parse";
329330
);

‎src/bootstrap/src/core/build_steps/test.rs

+77
Original file line numberDiff line numberDiff line change
@@ -3505,3 +3505,80 @@ impl Step for CodegenGCC {
35053505
cargo.into_cmd().run(builder);
35063506
}
35073507
}
3508+
3509+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3510+
pub struct TestFloatParse {
3511+
path: PathBuf,
3512+
host: TargetSelection,
3513+
}
3514+
3515+
impl Step for TestFloatParse {
3516+
type Output = ();
3517+
const ONLY_HOSTS: bool = true;
3518+
const DEFAULT: bool = true;
3519+
3520+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3521+
run.path("src/etc/test-float-parse")
3522+
}
3523+
3524+
fn make_run(run: RunConfig<'_>) {
3525+
for path in run.paths {
3526+
let path = path.assert_single_path().path.clone();
3527+
run.builder.ensure(Self { path, host: run.target });
3528+
}
3529+
}
3530+
3531+
fn run(self, builder: &Builder<'_>) {
3532+
let bootstrap_host = builder.config.build;
3533+
let compiler = builder.compiler(0, bootstrap_host);
3534+
let path = self.path.to_str().unwrap();
3535+
let crate_name = self.path.components().last().unwrap().as_os_str().to_str().unwrap();
3536+
3537+
builder.ensure(compile::Std::new(compiler, self.host));
3538+
3539+
// Run any unit tests in the crate
3540+
let cargo_test = tool::prepare_tool_cargo(
3541+
builder,
3542+
compiler,
3543+
Mode::ToolStd,
3544+
bootstrap_host,
3545+
"test",
3546+
path,
3547+
SourceType::InTree,
3548+
&[],
3549+
);
3550+
3551+
run_cargo_test(
3552+
cargo_test,
3553+
&[],
3554+
&[],
3555+
crate_name,
3556+
crate_name,
3557+
compiler,
3558+
bootstrap_host,
3559+
builder,
3560+
);
3561+
3562+
// Run the actual parse tests.
3563+
let mut cargo_run = tool::prepare_tool_cargo(
3564+
builder,
3565+
compiler,
3566+
Mode::ToolStd,
3567+
bootstrap_host,
3568+
"run",
3569+
path,
3570+
SourceType::InTree,
3571+
&[],
3572+
);
3573+
3574+
cargo_run.arg("--");
3575+
if builder.config.args().is_empty() {
3576+
// By default, exclude tests that take longer than ~1m.
3577+
cargo_run.arg("--skip-huge");
3578+
} else {
3579+
cargo_run.args(builder.config.args());
3580+
}
3581+
3582+
cargo_run.into_cmd().run(builder);
3583+
}
3584+
}

‎src/bootstrap/src/core/builder.rs

+3
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ impl<'a> Builder<'a> {
826826
clippy::Rustdoc,
827827
clippy::Rustfmt,
828828
clippy::RustInstaller,
829+
clippy::TestFloatParse,
829830
clippy::Tidy,
830831
),
831832
Kind::Check | Kind::Fix => describe!(
@@ -840,6 +841,7 @@ impl<'a> Builder<'a> {
840841
check::Rls,
841842
check::Rustfmt,
842843
check::RustAnalyzer,
844+
check::TestFloatParse,
843845
check::Bootstrap,
844846
),
845847
Kind::Test => describe!(
@@ -901,6 +903,7 @@ impl<'a> Builder<'a> {
901903
test::RustdocJson,
902904
test::HtmlCheck,
903905
test::RustInstaller,
906+
test::TestFloatParse,
904907
// Run bootstrap close to the end as it's unlikely to fail
905908
test::Bootstrap,
906909
// Run run-make last, since these won't pass without make on Windows
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.