File tree 1 file changed +8
-7
lines changed
src/tools/compiletest/src/runtest
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,16 @@ impl TestCx<'_> {
5
5
let pm = self . pass_mode ( ) ;
6
6
let proc_res = self . compile_test ( WillExecute :: No , self . should_emit_metadata ( pm) ) ;
7
7
8
- if std:: env:: var ( "COMPILETEST_VERBOSE_CRASHES" ) . is_ok ( ) {
9
- eprintln ! ( "{}" , proc_res. status) ;
10
- eprintln ! ( "{}" , proc_res. stdout) ;
11
- eprintln ! ( "{}" , proc_res. stderr) ;
12
- eprintln ! ( "{}" , proc_res. cmdline) ;
13
- }
14
-
15
8
// if a test does not crash, consider it an error
16
9
if proc_res. status . success ( ) || matches ! ( proc_res. status. code( ) , Some ( 1 | 0 ) ) {
10
+ // HACK(jieyouxu): flip it so it verbose if the test *fails* to crash.
11
+ if std:: env:: var ( "COMPILETEST_VERBOSE_CRASHES" ) . is_ok ( ) {
12
+ eprintln ! ( "{}" , proc_res. status) ;
13
+ eprintln ! ( "{}" , proc_res. stdout) ;
14
+ eprintln ! ( "{}" , proc_res. stderr) ;
15
+ eprintln ! ( "{}" , proc_res. cmdline) ;
16
+ }
17
+
17
18
self . fatal ( & format ! (
18
19
"crashtest no longer crashes/triggers ICE, horray! Please give it a meaningful \
19
20
name, add a doc-comment to the start of the test explaining why it exists and \
You can’t perform that action at this time.
0 commit comments