@@ -134,13 +134,13 @@ extern crate toml;
134
134
#[ cfg( unix) ]
135
135
extern crate libc;
136
136
137
- use std:: cell:: Cell ;
137
+ use std:: cell:: RefCell ;
138
138
use std:: collections:: { HashSet , HashMap } ;
139
139
use std:: env;
140
140
use std:: fs:: { self , File } ;
141
141
use std:: io:: Read ;
142
142
use std:: path:: { PathBuf , Path } ;
143
- use std:: process:: Command ;
143
+ use std:: process:: { self , Command } ;
144
144
use std:: slice;
145
145
146
146
use build_helper:: { run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime,
@@ -247,7 +247,7 @@ pub struct Build {
247
247
crates : HashMap < Interned < String > , Crate > ,
248
248
is_sudo : bool ,
249
249
ci_env : CiEnv ,
250
- delayed_failures : Cell < usize > ,
250
+ delayed_failures : RefCell < Vec < String > > ,
251
251
}
252
252
253
253
#[ derive( Debug ) ]
@@ -329,7 +329,7 @@ impl Build {
329
329
lldb_python_dir : None ,
330
330
is_sudo,
331
331
ci_env : CiEnv :: current ( ) ,
332
- delayed_failures : Cell :: new ( 0 ) ,
332
+ delayed_failures : RefCell :: new ( Vec :: new ( ) ) ,
333
333
}
334
334
}
335
335
@@ -368,6 +368,16 @@ impl Build {
368
368
metadata:: build ( self ) ;
369
369
370
370
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
+ }
371
381
}
372
382
373
383
/// Clear out `dir` if `input` is newer.
0 commit comments