@@ -257,21 +257,20 @@ impl Builder {
257
257
/// If a tool does not pass its tests, don't ship it.
258
258
/// Right now, we do this only for Miri.
259
259
fn check_toolstate ( & mut self ) {
260
- let toolstates : Option < HashMap < String , String > > =
261
- File :: open ( self . input . join ( "toolstates-linux.json" ) )
260
+ for file in & [ "toolstates-linux.json" , "toolstates-windows.json" ] {
261
+ let toolstates : Option < HashMap < String , String > > = File :: open ( self . input . join ( file ) )
262
262
. ok ( )
263
263
. and_then ( |f| serde_json:: from_reader ( & f) . ok ( ) ) ;
264
- let toolstates = toolstates. unwrap_or_else ( || {
265
- println ! (
266
- "WARNING: `toolstates-linux.json` missing/malformed; \
267
- assuming all tools failed"
268
- ) ;
269
- HashMap :: default ( ) // Use empty map if anything went wrong.
270
- } ) ;
271
- // Mark some tools as missing based on toolstate.
272
- if toolstates. get ( "miri" ) . map ( |s| & * s as & str ) != Some ( "test-pass" ) {
273
- println ! ( "Miri tests are not passing, removing component" ) ;
274
- self . versions . disable_version ( & PkgType :: Miri ) ;
264
+ let toolstates = toolstates. unwrap_or_else ( || {
265
+ println ! ( "WARNING: `{}` missing/malformed; assuming all tools failed" , file) ;
266
+ HashMap :: default ( ) // Use empty map if anything went wrong.
267
+ } ) ;
268
+ // Mark some tools as missing based on toolstate.
269
+ if toolstates. get ( "miri" ) . map ( |s| & * s as & str ) != Some ( "test-pass" ) {
270
+ println ! ( "Miri tests are not passing, removing component" ) ;
271
+ self . versions . disable_version ( & PkgType :: Miri ) ;
272
+ break ;
273
+ }
275
274
}
276
275
}
277
276
0 commit comments