@@ -248,7 +248,7 @@ impl<'test> TestCx<'test> {
248
248
}
249
249
250
250
fn run_cfail_test ( & self ) {
251
- let proc_res = self . compile_test ( & [ ] ) ;
251
+ let proc_res = self . compile_test ( ) ;
252
252
self . check_if_test_should_compile ( & proc_res) ;
253
253
self . check_no_compiler_crash ( & proc_res) ;
254
254
@@ -267,7 +267,7 @@ impl<'test> TestCx<'test> {
267
267
}
268
268
269
269
fn run_rfail_test ( & self ) {
270
- let proc_res = self . compile_test ( & [ ] ) ;
270
+ let proc_res = self . compile_test ( ) ;
271
271
272
272
if !proc_res. status . success ( ) {
273
273
self . fatal_proc_rec ( "compilation failed!" , & proc_res) ;
@@ -309,7 +309,7 @@ impl<'test> TestCx<'test> {
309
309
}
310
310
311
311
fn run_rpass_test ( & self ) {
312
- let proc_res = self . compile_test ( & [ ] ) ;
312
+ let proc_res = self . compile_test ( ) ;
313
313
314
314
if !proc_res. status . success ( ) {
315
315
self . fatal_proc_rec ( "compilation failed!" , & proc_res) ;
@@ -336,7 +336,7 @@ impl<'test> TestCx<'test> {
336
336
return self . run_rpass_test ( ) ;
337
337
}
338
338
339
- let mut proc_res = self . compile_test ( & [ ] ) ;
339
+ let mut proc_res = self . compile_test ( ) ;
340
340
341
341
if !proc_res. status . success ( ) {
342
342
self . fatal_proc_rec ( "compilation failed!" , & proc_res) ;
@@ -578,7 +578,7 @@ impl<'test> TestCx<'test> {
578
578
let mut cmds = commands. join ( "\n " ) ;
579
579
580
580
// compile test file (it should have 'compile-flags:-g' in the header)
581
- let compiler_run_result = self . compile_test ( & [ ] ) ;
581
+ let compiler_run_result = self . compile_test ( ) ;
582
582
if !compiler_run_result. status . success ( ) {
583
583
self . fatal_proc_rec ( "compilation failed!" , & compiler_run_result) ;
584
584
}
@@ -835,7 +835,7 @@ impl<'test> TestCx<'test> {
835
835
836
836
fn run_debuginfo_lldb_test_no_opt ( & self ) {
837
837
// compile test file (it should have 'compile-flags:-g' in the header)
838
- let compile_result = self . compile_test ( & [ ] ) ;
838
+ let compile_result = self . compile_test ( ) ;
839
839
if !compile_result. status . success ( ) {
840
840
self . fatal_proc_rec ( "compilation failed!" , & compile_result) ;
841
841
}
@@ -1272,15 +1272,12 @@ impl<'test> TestCx<'test> {
1272
1272
}
1273
1273
}
1274
1274
1275
- fn compile_test ( & self , extra_args : & [ & ' static str ] ) -> ProcRes {
1275
+ fn compile_test ( & self ) -> ProcRes {
1276
1276
let mut rustc = self . make_compile_args (
1277
1277
& self . testpaths . file ,
1278
1278
TargetLocation :: ThisFile ( self . make_exe_name ( ) ) ,
1279
1279
) ;
1280
1280
1281
- if !extra_args. is_empty ( ) {
1282
- rustc. args ( extra_args) ;
1283
- }
1284
1281
rustc. arg ( "-L" ) . arg ( & self . aux_output_dir_name ( ) ) ;
1285
1282
1286
1283
match self . config . mode {
@@ -2115,7 +2112,7 @@ impl<'test> TestCx<'test> {
2115
2112
fn run_codegen_units_test ( & self ) {
2116
2113
assert ! ( self . revision. is_none( ) , "revisions not relevant here" ) ;
2117
2114
2118
- let proc_res = self . compile_test ( & [ ] ) ;
2115
+ let proc_res = self . compile_test ( ) ;
2119
2116
2120
2117
if !proc_res. status . success ( ) {
2121
2118
self . fatal_proc_rec ( "compilation failed!" , & proc_res) ;
@@ -2491,15 +2488,7 @@ impl<'test> TestCx<'test> {
2491
2488
}
2492
2489
2493
2490
fn run_ui_test ( & self ) {
2494
- // if the user specified a format in the ui test
2495
- // print the output to the stderr file, otherwise extract
2496
- // the rendered error messages from json and print them
2497
- let explicit = self . props
2498
- . compile_flags
2499
- . iter ( )
2500
- . any ( |s| s. contains ( "--error-format" ) ) ;
2501
-
2502
- let proc_res = self . compile_test ( & [ ] ) ;
2491
+ let proc_res = self . compile_test ( ) ;
2503
2492
self . check_if_test_should_compile ( & proc_res) ;
2504
2493
2505
2494
let expected_stderr_path = self . expected_output_path ( UI_STDERR ) ;
@@ -2535,29 +2524,17 @@ impl<'test> TestCx<'test> {
2535
2524
) ;
2536
2525
}
2537
2526
2538
- let expected_errors = errors:: load_errors ( & self . testpaths . file , self . revision ) ;
2539
-
2540
2527
if self . props . run_pass {
2541
2528
let proc_res = self . exec_compiled_test ( ) ;
2542
2529
2543
2530
if !proc_res. status . success ( ) {
2544
2531
self . fatal_proc_rec ( "test run failed!" , & proc_res) ;
2545
2532
}
2546
2533
}
2547
- if !explicit {
2548
- let proc_res = self . compile_test ( & [ "--error-format" , "json" ] ) ;
2549
- if !expected_errors. is_empty ( ) || !proc_res. status . success ( ) {
2550
- // "// error-pattern" comments
2551
- self . check_expected_errors ( expected_errors, & proc_res) ;
2552
- } else if !self . props . error_patterns . is_empty ( ) || !proc_res. status . success ( ) {
2553
- // "//~ERROR comments"
2554
- self . check_error_patterns ( & proc_res. stderr , & proc_res) ;
2555
- }
2556
- }
2557
2534
}
2558
2535
2559
2536
fn run_mir_opt_test ( & self ) {
2560
- let proc_res = self . compile_test ( & [ ] ) ;
2537
+ let proc_res = self . compile_test ( ) ;
2561
2538
2562
2539
if !proc_res. status . success ( ) {
2563
2540
self . fatal_proc_rec ( "compilation failed!" , & proc_res) ;
0 commit comments