File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2783,10 +2783,28 @@ impl Step for Crate {
27832783 _ => panic ! ( "can only test libraries" ) ,
27842784 } ;
27852785
2786+ let crates = self
2787+ . crates
2788+ . iter ( )
2789+ . cloned ( )
2790+ . map ( |crate_| {
2791+ // The core and alloc crates can't directly be tested. We could
2792+ // silently ignore them, but replacing them with their test crate
2793+ // is less confusing for users.
2794+ if crate_ == "core" {
2795+ "coretests" . to_owned ( )
2796+ } else if crate_ == "alloc" {
2797+ "alloctests" . to_owned ( )
2798+ } else {
2799+ crate_
2800+ }
2801+ } )
2802+ . collect :: < Vec < _ > > ( ) ;
2803+
27862804 run_cargo_test (
27872805 cargo,
27882806 & [ ] ,
2789- & self . crates ,
2807+ & crates,
27902808 & self . crates [ 0 ] ,
27912809 & * crate_description ( & self . crates ) ,
27922810 target,
You can’t perform that action at this time.
0 commit comments