@@ -2090,50 +2090,10 @@ impl<'test> TestCx<'test> {
2090
2090
}
2091
2091
2092
2092
fn fatal_proc_rec ( & self , err : & str , proc_res : & ProcRes ) -> ! {
2093
- self . try_print_open_handles ( ) ;
2094
2093
self . error ( err) ;
2095
2094
proc_res. fatal ( None ) ;
2096
2095
}
2097
2096
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
-
2137
2097
// codegen tests (using FileCheck)
2138
2098
2139
2099
fn compile_test_and_save_ir ( & self ) -> ProcRes {
@@ -2844,7 +2804,7 @@ impl<'test> TestCx<'test> {
2844
2804
let stderr = if explicit {
2845
2805
proc_res. stderr . clone ( )
2846
2806
} else {
2847
- json:: extract_rendered ( & proc_res. stderr , & proc_res )
2807
+ json:: extract_rendered ( & proc_res. stderr )
2848
2808
} ;
2849
2809
2850
2810
let normalized_stderr = self . normalize_output ( & stderr, & self . props . normalize_stderr ) ;
@@ -3464,7 +3424,9 @@ impl ProcRes {
3464
3424
{}\n \
3465
3425
------------------------------------------\n \
3466
3426
\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) ,
3468
3430
) ;
3469
3431
// Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
3470
3432
// compiletest, which is unnecessary noise.
0 commit comments