@@ -73,7 +73,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
73
73
let proc_res = compile_test ( config, props, testfile) ;
74
74
75
75
if proc_res. status . success ( ) {
76
- fatal_ProcRes ( "compile-fail test compiled successfully!" . to_string ( ) ,
76
+ fatal_proc_rec ( "compile-fail test compiled successfully!" . to_string ( ) ,
77
77
& proc_res) ;
78
78
}
79
79
@@ -97,7 +97,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
97
97
let proc_res = compile_test ( config, props, testfile) ;
98
98
99
99
if !proc_res. status . success ( ) {
100
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & proc_res) ;
100
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & proc_res) ;
101
101
}
102
102
103
103
exec_compiled_test ( config, props, testfile)
@@ -108,7 +108,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
108
108
// The value our Makefile configures valgrind to return on failure
109
109
static VALGRIND_ERR : int = 100 ;
110
110
if proc_res. status . matches_exit_status ( VALGRIND_ERR ) {
111
- fatal_ProcRes ( "run-fail test isn't valgrind-clean!" . to_string ( ) ,
111
+ fatal_proc_rec ( "run-fail test isn't valgrind-clean!" . to_string ( ) ,
112
112
& proc_res) ;
113
113
}
114
114
@@ -120,7 +120,7 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
120
120
// The value the rust runtime returns on failure
121
121
static RUST_ERR : int = 101 ;
122
122
if !proc_res. status . matches_exit_status ( RUST_ERR ) {
123
- fatal_ProcRes (
123
+ fatal_proc_rec (
124
124
format ! ( "failure produced the wrong error: {}" , proc_res. status) ,
125
125
proc_res) ;
126
126
}
@@ -131,19 +131,19 @@ fn run_rpass_test(config: &Config, props: &TestProps, testfile: &Path) {
131
131
let mut proc_res = compile_test ( config, props, testfile) ;
132
132
133
133
if !proc_res. status . success ( ) {
134
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & proc_res) ;
134
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & proc_res) ;
135
135
}
136
136
137
137
proc_res = exec_compiled_test ( config, props, testfile) ;
138
138
139
139
if !proc_res. status . success ( ) {
140
- fatal_ProcRes ( "test run failed!" . to_string ( ) , & proc_res) ;
140
+ fatal_proc_rec ( "test run failed!" . to_string ( ) , & proc_res) ;
141
141
}
142
142
} else {
143
143
let proc_res = jit_test ( config, props, testfile) ;
144
144
145
145
if !proc_res. status . success ( ) {
146
- fatal_ProcRes ( "jit failed!" . to_string ( ) , & proc_res) ;
146
+ fatal_proc_rec ( "jit failed!" . to_string ( ) , & proc_res) ;
147
147
}
148
148
}
149
149
}
@@ -172,7 +172,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
172
172
"normal" ) ;
173
173
174
174
if !proc_res. status . success ( ) {
175
- fatal_ProcRes ( format ! ( "pretty-printing failed in round {}" , round) ,
175
+ fatal_proc_rec ( format ! ( "pretty-printing failed in round {}" , round) ,
176
176
& proc_res) ;
177
177
}
178
178
@@ -204,21 +204,21 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
204
204
let proc_res = typecheck_source ( config, props, testfile, actual) ;
205
205
206
206
if !proc_res. status . success ( ) {
207
- fatal_ProcRes ( "pretty-printed source does not typecheck" . to_string ( ) ,
207
+ fatal_proc_rec ( "pretty-printed source does not typecheck" . to_string ( ) ,
208
208
& proc_res) ;
209
209
}
210
210
if props. no_pretty_expanded { return }
211
211
212
212
// additionally, run `--pretty expanded` and try to build it.
213
213
let proc_res = print_source ( config, props, testfile, ( * srcs. get ( round) ) . clone ( ) , "expanded" ) ;
214
214
if !proc_res. status . success ( ) {
215
- fatal_ProcRes ( format ! ( "pretty-printing (expanded) failed" ) , & proc_res) ;
215
+ fatal_proc_rec ( format ! ( "pretty-printing (expanded) failed" ) , & proc_res) ;
216
216
}
217
217
218
218
let ProcRes { stdout : expanded_src, .. } = proc_res;
219
219
let proc_res = typecheck_source ( config, props, testfile, expanded_src) ;
220
220
if !proc_res. status . success ( ) {
221
- fatal_ProcRes ( format ! ( "pretty-printed source (expanded) does \
221
+ fatal_proc_rec ( format ! ( "pretty-printed source (expanded) does \
222
222
not typecheck") ,
223
223
& proc_res) ;
224
224
}
@@ -326,7 +326,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
326
326
// compile test file (it shoud have 'compile-flags:-g' in the header)
327
327
let compiler_run_result = compile_test ( config, props, testfile) ;
328
328
if !compiler_run_result. status . success ( ) {
329
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & compiler_run_result) ;
329
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & compiler_run_result) ;
330
330
}
331
331
332
332
let exe_file = make_exe_name ( config, testfile) ;
@@ -517,7 +517,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
517
517
// compile test file (it shoud have 'compile-flags:-g' in the header)
518
518
let compile_result = compile_test ( config, props, testfile) ;
519
519
if !compile_result. status . success ( ) {
520
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & compile_result) ;
520
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & compile_result) ;
521
521
}
522
522
523
523
let exe_file = make_exe_name ( config, testfile) ;
@@ -560,7 +560,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
560
560
let debugger_run_result = run_lldb ( config, & exe_file, & debugger_script) ;
561
561
562
562
if !debugger_run_result. status . success ( ) {
563
- fatal_ProcRes ( "Error while running LLDB" . to_string ( ) ,
563
+ fatal_proc_rec ( "Error while running LLDB" . to_string ( ) ,
564
564
& debugger_run_result) ;
565
565
}
566
566
@@ -720,7 +720,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
720
720
}
721
721
}
722
722
if i != num_check_lines {
723
- fatal_ProcRes ( format ! ( "line not found in debugger output: {}" ,
723
+ fatal_proc_rec ( format ! ( "line not found in debugger output: {}" ,
724
724
check_lines. get( i) . unwrap( ) ) ,
725
725
debugger_run_result) ;
726
726
}
@@ -764,22 +764,22 @@ fn check_error_patterns(props: &TestProps,
764
764
let missing_patterns =
765
765
props. error_patterns . slice ( next_err_idx, props. error_patterns . len ( ) ) ;
766
766
if missing_patterns. len ( ) == 1 u {
767
- fatal_ProcRes ( format ! ( "error pattern '{}' not found!" ,
767
+ fatal_proc_rec ( format ! ( "error pattern '{}' not found!" ,
768
768
missing_patterns[ 0 ] ) ,
769
769
proc_res) ;
770
770
} else {
771
771
for pattern in missing_patterns. iter ( ) {
772
772
error ( format ! ( "error pattern '{}' not found!" , * pattern) ) ;
773
773
}
774
- fatal_ProcRes ( "multiple error patterns not found" . to_string ( ) ,
774
+ fatal_proc_rec ( "multiple error patterns not found" . to_string ( ) ,
775
775
proc_res) ;
776
776
}
777
777
}
778
778
779
779
fn check_no_compiler_crash ( proc_res : & ProcRes ) {
780
780
for line in proc_res. stderr . as_slice ( ) . lines ( ) {
781
781
if line. starts_with ( "error: internal compiler error:" ) {
782
- fatal_ProcRes ( "compiler encountered internal error" . to_string ( ) ,
782
+ fatal_proc_rec ( "compiler encountered internal error" . to_string ( ) ,
783
783
proc_res) ;
784
784
}
785
785
}
@@ -857,7 +857,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
857
857
}
858
858
859
859
if !was_expected && is_compiler_error_or_warning ( line) {
860
- fatal_ProcRes ( format ! ( "unexpected compiler error or warning: '{}'" ,
860
+ fatal_proc_rec ( format ! ( "unexpected compiler error or warning: '{}'" ,
861
861
line) ,
862
862
proc_res) ;
863
863
}
@@ -866,7 +866,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
866
866
for ( i, & flag) in found_flags. iter ( ) . enumerate ( ) {
867
867
if !flag {
868
868
let ee = expected_errors. get ( i) ;
869
- fatal_ProcRes ( format ! ( "expected {} on line {} not found: {}" ,
869
+ fatal_proc_rec ( format ! ( "expected {} on line {} not found: {}" ,
870
870
ee. kind, ee. line, ee. msg) ,
871
871
proc_res) ;
872
872
}
@@ -1047,7 +1047,7 @@ fn compose_and_run_compiler(
1047
1047
config. compile_lib_path . as_slice ( ) ,
1048
1048
None ) ;
1049
1049
if !auxres. status . success ( ) {
1050
- fatal_ProcRes (
1050
+ fatal_proc_rec (
1051
1051
format ! ( "auxiliary build of {} failed to compile: " ,
1052
1052
abs_ab. display( ) ) ,
1053
1053
& auxres) ;
@@ -1286,7 +1286,7 @@ fn error(err: String) { println!("\nerror: {}", err); }
1286
1286
1287
1287
fn fatal ( err : String ) -> ! { error ( err) ; fail ! ( ) ; }
1288
1288
1289
- fn fatal_ProcRes ( err : String , proc_res : & ProcRes ) -> ! {
1289
+ fn fatal_proc_rec ( err : String , proc_res : & ProcRes ) -> ! {
1290
1290
print ! ( "\n \
1291
1291
error: {}\n \
1292
1292
status: {}\n \
@@ -1562,35 +1562,35 @@ fn run_codegen_test(config: &Config, props: &TestProps,
1562
1562
1563
1563
let mut proc_res = compile_test_and_save_bitcode ( config, props, testfile) ;
1564
1564
if !proc_res. status . success ( ) {
1565
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & proc_res) ;
1565
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & proc_res) ;
1566
1566
}
1567
1567
1568
1568
proc_res = extract_function_from_bitcode ( config, props, "test" , testfile, "" ) ;
1569
1569
if !proc_res. status . success ( ) {
1570
- fatal_ProcRes ( "extracting 'test' function failed" . to_string ( ) ,
1570
+ fatal_proc_rec ( "extracting 'test' function failed" . to_string ( ) ,
1571
1571
& proc_res) ;
1572
1572
}
1573
1573
1574
1574
proc_res = disassemble_extract ( config, props, testfile, "" ) ;
1575
1575
if !proc_res. status . success ( ) {
1576
- fatal_ProcRes ( "disassembling extract failed" . to_string ( ) , & proc_res) ;
1576
+ fatal_proc_rec ( "disassembling extract failed" . to_string ( ) , & proc_res) ;
1577
1577
}
1578
1578
1579
1579
1580
1580
let mut proc_res = compile_cc_with_clang_and_save_bitcode ( config, props, testfile) ;
1581
1581
if !proc_res. status . success ( ) {
1582
- fatal_ProcRes ( "compilation failed!" . to_string ( ) , & proc_res) ;
1582
+ fatal_proc_rec ( "compilation failed!" . to_string ( ) , & proc_res) ;
1583
1583
}
1584
1584
1585
1585
proc_res = extract_function_from_bitcode ( config, props, "test" , testfile, "clang" ) ;
1586
1586
if !proc_res. status . success ( ) {
1587
- fatal_ProcRes ( "extracting 'test' function failed" . to_string ( ) ,
1587
+ fatal_proc_rec ( "extracting 'test' function failed" . to_string ( ) ,
1588
1588
& proc_res) ;
1589
1589
}
1590
1590
1591
1591
proc_res = disassemble_extract ( config, props, testfile, "clang" ) ;
1592
1592
if !proc_res. status . success ( ) {
1593
- fatal_ProcRes ( "disassembling extract failed" . to_string ( ) , & proc_res) ;
1593
+ fatal_proc_rec ( "disassembling extract failed" . to_string ( ) , & proc_res) ;
1594
1594
}
1595
1595
1596
1596
let base = output_base_name ( config, testfile) ;
0 commit comments