@@ -106,17 +106,13 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
106106}
107107
108108fn run_rfail_test ( config : & Config , props : & TestProps , testfile : & Path ) {
109- let proc_res = if !config. jit {
110- let proc_res = compile_test ( config, props, testfile) ;
109+ let mut proc_res = compile_test ( config, props, testfile) ;
111110
112- if !proc_res. status . success ( ) {
113- fatal_proc_rec ( "compilation failed!" , & proc_res) ;
114- }
111+ if !proc_res. status . success ( ) {
112+ fatal_proc_rec ( "compilation failed!" , & proc_res) ;
113+ }
115114
116- exec_compiled_test ( config, props, testfile)
117- } else {
118- jit_test ( config, props, testfile)
119- } ;
115+ proc_res = exec_compiled_test ( config, props, testfile) ;
120116
121117 // The value our Makefile configures valgrind to return on failure
122118 const VALGRIND_ERR : i32 = 100 ;
@@ -141,24 +137,16 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
141137}
142138
143139fn run_rpass_test ( config : & Config , props : & TestProps , testfile : & Path ) {
144- if !config. jit {
145- let mut proc_res = compile_test ( config, props, testfile) ;
146-
147- if !proc_res. status . success ( ) {
148- fatal_proc_rec ( "compilation failed!" , & proc_res) ;
149- }
140+ let mut proc_res = compile_test ( config, props, testfile) ;
150141
151- proc_res = exec_compiled_test ( config, props, testfile) ;
142+ if !proc_res. status . success ( ) {
143+ fatal_proc_rec ( "compilation failed!" , & proc_res) ;
144+ }
152145
153- if !proc_res. status . success ( ) {
154- fatal_proc_rec ( "test run failed!" , & proc_res) ;
155- }
156- } else {
157- let proc_res = jit_test ( config, props, testfile) ;
146+ proc_res = exec_compiled_test ( config, props, testfile) ;
158147
159- if !proc_res. status . success ( ) {
160- fatal_proc_rec ( "jit failed!" , & proc_res) ;
161- }
148+ if !proc_res. status . success ( ) {
149+ fatal_proc_rec ( "test run failed!" , & proc_res) ;
162150 }
163151}
164152
@@ -1150,20 +1138,10 @@ impl fmt::Display for Status {
11501138
11511139fn compile_test ( config : & Config , props : & TestProps ,
11521140 testfile : & Path ) -> ProcRes {
1153- compile_test_ ( config, props, testfile, & [ ] )
1154- }
1155-
1156- fn jit_test ( config : & Config , props : & TestProps , testfile : & Path ) -> ProcRes {
1157- compile_test_ ( config, props, testfile, & [ "--jit" . to_string ( ) ] )
1158- }
1159-
1160- fn compile_test_ ( config : & Config , props : & TestProps ,
1161- testfile : & Path , extra_args : & [ String ] ) -> ProcRes {
11621141 let aux_dir = aux_output_dir_name ( config, testfile) ;
11631142 // FIXME (#9639): This needs to handle non-utf8 paths
11641143 let mut link_args = vec ! ( "-L" . to_string( ) ,
11651144 aux_dir. to_str( ) . unwrap( ) . to_string( ) ) ;
1166- link_args. extend ( extra_args. iter ( ) . cloned ( ) ) ;
11671145 let args = make_compile_args ( config,
11681146 props,
11691147 link_args,
@@ -1172,7 +1150,7 @@ fn compile_test_(config: &Config, props: &TestProps,
11721150}
11731151
11741152fn document ( config : & Config , props : & TestProps ,
1175- testfile : & Path , extra_args : & [ String ] ) -> ( ProcRes , PathBuf ) {
1153+ testfile : & Path ) -> ( ProcRes , PathBuf ) {
11761154 let aux_dir = aux_output_dir_name ( config, testfile) ;
11771155 let out_dir = output_base_name ( config, testfile) ;
11781156 let _ = fs:: remove_dir_all ( & out_dir) ;
@@ -1182,7 +1160,6 @@ fn document(config: &Config, props: &TestProps,
11821160 "-o" . to_string( ) ,
11831161 out_dir. to_str( ) . unwrap( ) . to_string( ) ,
11841162 testfile. to_str( ) . unwrap( ) . to_string( ) ] ;
1185- args. extend ( extra_args. iter ( ) . cloned ( ) ) ;
11861163 args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
11871164 let args = ProcArgs {
11881165 prog : config. rustdoc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -1843,7 +1820,7 @@ fn charset() -> &'static str {
18431820}
18441821
18451822fn run_rustdoc_test ( config : & Config , props : & TestProps , testfile : & Path ) {
1846- let ( proc_res, out_dir) = document ( config, props, testfile, & [ ] ) ;
1823+ let ( proc_res, out_dir) = document ( config, props, testfile) ;
18471824 if !proc_res. status . success ( ) {
18481825 fatal_proc_rec ( "rustdoc failed!" , & proc_res) ;
18491826 }
0 commit comments