@@ -2090,50 +2090,10 @@ impl<'test> TestCx<'test> {
20902090 }
20912091
20922092 fn fatal_proc_rec ( & self , err : & str , proc_res : & ProcRes ) -> ! {
2093- self . try_print_open_handles ( ) ;
20942093 self . error ( err) ;
20952094 proc_res. fatal ( None ) ;
20962095 }
20972096
2098- // This function is a poor man's attempt to debug rust-lang/rust#38620, if
2099- // that's closed then this should be deleted
2100- //
2101- // This is a very "opportunistic" debugging attempt, so we ignore all
2102- // errors here.
2103- fn try_print_open_handles ( & self ) {
2104- if !cfg ! ( windows) {
2105- return ;
2106- }
2107- if self . config . mode != Incremental {
2108- return ;
2109- }
2110-
2111- let filename = match self . testpaths . file . file_stem ( ) {
2112- Some ( path) => path,
2113- None => return ,
2114- } ;
2115-
2116- let mut cmd = Command :: new ( "handle.exe" ) ;
2117- cmd. arg ( "-a" ) . arg ( "-u" ) ;
2118- cmd. arg ( filename) ;
2119- cmd. arg ( "-nobanner" ) ;
2120- cmd. stdout ( Stdio :: piped ( ) ) ;
2121- cmd. stderr ( Stdio :: piped ( ) ) ;
2122- let output = match cmd. spawn ( ) . and_then ( read2_abbreviated) {
2123- Ok ( output) => output,
2124- Err ( _) => return ,
2125- } ;
2126- println ! ( "---------------------------------------------------" ) ;
2127- println ! ( "ran extra command to debug rust-lang/rust#38620: " ) ;
2128- println ! ( "{:?}" , cmd) ;
2129- println ! ( "result: {}" , output. status) ;
2130- println ! ( "--- stdout ----------------------------------------" ) ;
2131- println ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
2132- println ! ( "--- stderr ----------------------------------------" ) ;
2133- println ! ( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
2134- println ! ( "---------------------------------------------------" ) ;
2135- }
2136-
21372097 // codegen tests (using FileCheck)
21382098
21392099 fn compile_test_and_save_ir ( & self ) -> ProcRes {
@@ -2844,7 +2804,7 @@ impl<'test> TestCx<'test> {
28442804 let stderr = if explicit {
28452805 proc_res. stderr . clone ( )
28462806 } else {
2847- json:: extract_rendered ( & proc_res. stderr , & proc_res )
2807+ json:: extract_rendered ( & proc_res. stderr )
28482808 } ;
28492809
28502810 let normalized_stderr = self . normalize_output ( & stderr, & self . props . normalize_stderr ) ;
@@ -3464,7 +3424,9 @@ impl ProcRes {
34643424 {}\n \
34653425 ------------------------------------------\n \
34663426 \n ",
3467- self . status, self . cmdline, self . stdout, self . stderr
3427+ self . status, self . cmdline,
3428+ json:: extract_rendered( & self . stdout) ,
3429+ json:: extract_rendered( & self . stderr) ,
34683430 ) ;
34693431 // Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
34703432 // compiletest, which is unnecessary noise.
0 commit comments