Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2785,14 +2785,15 @@ impl Step for Crate {
_ => panic!("can only test libraries"),
};

run_cargo_test(
cargo,
&[],
&self.crates,
&*crate_description(&self.crates),
target,
builder,
);
let mut crates = self.crates.clone();
// The core crate can't directly be tested. We could silently
// ignore it, but adding it's own test crate is less confusing
// for users. We still keep core itself for doctests.
if crates.iter().any(|crate_| crate_ == "core") {
crates.push("coretests".to_owned());
}
Comment on lines +2788 to +2794
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this here feels somewhat iffy to me, but the Crate step is iffy itself (I feel like we really ought to be splitting it to be a library-crate-facing step vs compiler-crate-facing step).


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

Expand Down