@@ -2382,7 +2382,7 @@ impl<'test> TestCx<'test> {
2382
2382
AllowUnused :: Yes ,
2383
2383
) ;
2384
2384
rustc. arg ( "-L" ) . arg ( & new_rustdoc. aux_output_dir_name ( ) ) ;
2385
- new_rustdoc. build_all_auxiliary ( & mut dbg ! ( rustc) ) ;
2385
+ new_rustdoc. build_all_auxiliary ( & mut rustc) ;
2386
2386
2387
2387
let proc_res = new_rustdoc. document ( & compare_dir) ;
2388
2388
if !proc_res. status . success ( ) {
@@ -2414,19 +2414,25 @@ impl<'test> TestCx<'test> {
2414
2414
let mut diff = Command :: new ( "diff" ) ;
2415
2415
diff. args ( & [ "-u" , "-r" ] ) . args ( & [ out_dir, & compare_dir] ) ;
2416
2416
2417
- if has_delta {
2417
+ let output = if has_delta {
2418
2418
let diff_pid = diff. stdout ( Stdio :: piped ( ) ) . spawn ( ) . expect ( "failed to run `diff`" ) ;
2419
- let status = Command :: new ( "delta" )
2419
+ let output = Command :: new ( "delta" )
2420
2420
. arg ( "--paging=never" )
2421
2421
. stdin ( diff_pid. stdout . unwrap ( ) )
2422
- . status ( )
2422
+ // Capture output and print it explicitly so it will in turn be
2423
+ // captured by libtest.
2424
+ . output ( )
2423
2425
. unwrap ( ) ;
2424
- assert ! ( status. success( ) ) ;
2426
+ assert ! ( output. status. success( ) ) ;
2427
+ output
2425
2428
} else {
2426
2429
eprintln ! ( "warning: `delta` not installed, falling back to `diff --color`" ) ;
2427
- diff. arg ( "--color" ) . spawn ( ) . expect ( "failed to run `diff`" ) . wait ( ) . unwrap ( ) ;
2428
- assert ! ( status. success( ) || status. code( ) == Some ( 1 ) ) ;
2429
- }
2430
+ let output = diff. arg ( "--color" ) . output ( ) . unwrap ( ) ;
2431
+ assert ! ( output. status. success( ) || output. status. code( ) == Some ( 1 ) ) ;
2432
+ output
2433
+ } ;
2434
+ println ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
2435
+ eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
2430
2436
}
2431
2437
2432
2438
fn get_lines < P : AsRef < Path > > (
0 commit comments