File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4103,7 +4103,15 @@ pub fn run_stack_shard_with_sources(
41034103 . cpu_prerequisites
41044104 . iter ( )
41054105 . cloned ( )
4106- . chain ( cpu_root_lines. iter ( ) . map ( |& i| closures[ i] . root . clone ( ) ) )
4106+ . chain ( cpu_root_lines. iter ( ) . filter_map ( |& i| {
4107+ let closure = & closures[ i] ;
4108+ closure
4109+ . to_build
4110+ . contains ( & closure. root )
4111+ . then ( || closure. root . clone ( ) )
4112+ } ) )
4113+ . collect :: < BTreeSet < _ > > ( )
4114+ . into_iter ( )
41074115 . collect ( ) ;
41084116 let cpu_footprint = crate :: inode_budget:: shard_footprint (
41094117 & cpu_modules,
@@ -4117,7 +4125,7 @@ pub fn run_stack_shard_with_sources(
41174125 } else {
41184126 json!( "cpu-prerequisites.list" )
41194127 } ,
4120- "weight" : planned . cpu_prerequisites_weight ,
4128+ "weight" : cpu_modules . iter ( ) . map ( |module| weight ( module ) ) . sum :: < u64 > ( ) ,
41214129 "inode_footprint" : cpu_footprint. inodes,
41224130 "inode_peak_module" : cpu_footprint. peak_module,
41234131 "modules" : module_meta( & planned. cpu_prerequisites) ,
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ fn explicit_destination_controls_root_closure_cost_and_row_retention() {
8888 . unwrap( )
8989 . contains( "--installpath-modules" )
9090 ) ;
91+ if lifted {
92+ assert_eq ! ( missing[ "cpu_prerequisites" ] [ "weight" ] , 2 ) ;
93+ assert ! ( missing[ "cpu_prerequisites" ] [ "inode_footprint" ] . as_u64( ) . unwrap( ) > 2000 ) ;
94+ }
9195 if !lifted {
9296 assert_eq ! ( missing[ "shards" ] [ 0 ] [ "weight" ] , 2 ) ;
9397 assert ! ( missing[ "shards" ] [ 0 ] [ "inode_footprint" ] . as_u64( ) . unwrap( ) > 1000 ) ;
@@ -98,6 +102,10 @@ fn explicit_destination_controls_root_closure_cost_and_row_retention() {
98102 assert_eq ! ( present[ "lines" ] [ 0 ] [ "closure" ] , serde_json:: json!( [ ] ) ) ;
99103 assert_ne ! ( missing[ "inputs" ] [ "sha256" ] , present[ "inputs" ] [ "sha256" ] ) ;
100104 assert_eq ! ( present[ "lines" ] [ 0 ] [ "text" ] , row) ;
105+ if lifted {
106+ assert_eq ! ( present[ "cpu_prerequisites" ] [ "weight" ] , 0 ) ;
107+ assert_eq ! ( present[ "cpu_prerequisites" ] [ "inode_footprint" ] , 1000 ) ;
108+ }
101109 }
102110 }
103111}
You can’t perform that action at this time.
0 commit comments