@@ -134,13 +134,13 @@ extern crate toml;
134134#[ cfg( unix) ]
135135extern crate libc;
136136
137- use std:: cell:: Cell ;
137+ use std:: cell:: RefCell ;
138138use std:: collections:: { HashSet , HashMap } ;
139139use std:: env;
140140use std:: fs:: { self , File } ;
141141use std:: io:: Read ;
142142use std:: path:: { PathBuf , Path } ;
143- use std:: process:: Command ;
143+ use std:: process:: { self , Command } ;
144144use std:: slice;
145145
146146use build_helper:: { run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime,
@@ -247,7 +247,7 @@ pub struct Build {
247247 crates : HashMap < Interned < String > , Crate > ,
248248 is_sudo : bool ,
249249 ci_env : CiEnv ,
250- delayed_failures : Cell < usize > ,
250+ delayed_failures : RefCell < Vec < String > > ,
251251}
252252
253253#[ derive( Debug ) ]
@@ -329,7 +329,7 @@ impl Build {
329329 lldb_python_dir : None ,
330330 is_sudo,
331331 ci_env : CiEnv :: current ( ) ,
332- delayed_failures : Cell :: new ( 0 ) ,
332+ delayed_failures : RefCell :: new ( Vec :: new ( ) ) ,
333333 }
334334 }
335335
@@ -368,6 +368,16 @@ impl Build {
368368 metadata:: build ( self ) ;
369369
370370 builder:: Builder :: run ( & self ) ;
371+
372+ // Check for postponed failures from `test --no-fail-fast`.
373+ let failures = self . delayed_failures . borrow ( ) ;
374+ if failures. len ( ) > 0 {
375+ println ! ( "\n {} command(s) did not execute successfully:\n " , failures. len( ) ) ;
376+ for failure in failures. iter ( ) {
377+ println ! ( " - {}\n " , failure) ;
378+ }
379+ process:: exit ( 1 ) ;
380+ }
371381 }
372382
373383 /// Clear out `dir` if `input` is newer.
0 commit comments