Skip to content

Commit 7d547bf

Browse files
committed
Fix miri by ensuring that core and alloc don't get tested directly
cargo test -p core -p alloc overrides the test=false in Cargo.toml so we have to avoid passing -p core and -p alloc to cargo test.
1 parent 9ff085c commit 7d547bf

File tree

1 file changed

+6
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,12 +2786,15 @@ impl Step for Crate {
27862786
};
27872787

27882788
let mut crates = self.crates.clone();
2789-
// The core crate can't directly be tested. We could silently
2790-
// ignore it, but replacing it with it's own test crate is less
2791-
// confusing for users.
2789+
// The core and alloc crates can't directly be tested. We could
2790+
// silently ignore them, but replacing them with their test crate
2791+
// is less confusing for users.
27922792
if crates.iter().any(|crate_| crate_ == "core") {
27932793
crates.push("coretests".to_owned());
27942794
}
2795+
if crates.iter().any(|crate_| crate_ == "alloc") {
2796+
crates.push("alloctests".to_owned());
2797+
}
27952798

27962799
run_cargo_test(cargo, &[], &crates, &*crate_description(&self.crates), target, builder);
27972800
}

0 commit comments

Comments
 (0)