@@ -106,17 +106,13 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
106
106
}
107
107
108
108
fn 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) ;
111
110
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
+ }
115
114
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) ;
120
116
121
117
// The value our Makefile configures valgrind to return on failure
122
118
const VALGRIND_ERR : i32 = 100 ;
@@ -141,24 +137,16 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
141
137
}
142
138
143
139
fn 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) ;
150
141
151
- proc_res = exec_compiled_test ( config, props, testfile) ;
142
+ if !proc_res. status . success ( ) {
143
+ fatal_proc_rec ( "compilation failed!" , & proc_res) ;
144
+ }
152
145
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) ;
158
147
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) ;
162
150
}
163
151
}
164
152
@@ -1150,20 +1138,10 @@ impl fmt::Display for Status {
1150
1138
1151
1139
fn compile_test ( config : & Config , props : & TestProps ,
1152
1140
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 {
1162
1141
let aux_dir = aux_output_dir_name ( config, testfile) ;
1163
1142
// FIXME (#9639): This needs to handle non-utf8 paths
1164
1143
let mut link_args = vec ! ( "-L" . to_string( ) ,
1165
1144
aux_dir. to_str( ) . unwrap( ) . to_string( ) ) ;
1166
- link_args. extend ( extra_args. iter ( ) . cloned ( ) ) ;
1167
1145
let args = make_compile_args ( config,
1168
1146
props,
1169
1147
link_args,
@@ -1172,7 +1150,7 @@ fn compile_test_(config: &Config, props: &TestProps,
1172
1150
}
1173
1151
1174
1152
fn document ( config : & Config , props : & TestProps ,
1175
- testfile : & Path , extra_args : & [ String ] ) -> ( ProcRes , PathBuf ) {
1153
+ testfile : & Path ) -> ( ProcRes , PathBuf ) {
1176
1154
let aux_dir = aux_output_dir_name ( config, testfile) ;
1177
1155
let out_dir = output_base_name ( config, testfile) ;
1178
1156
let _ = fs:: remove_dir_all ( & out_dir) ;
@@ -1182,7 +1160,6 @@ fn document(config: &Config, props: &TestProps,
1182
1160
"-o" . to_string( ) ,
1183
1161
out_dir. to_str( ) . unwrap( ) . to_string( ) ,
1184
1162
testfile. to_str( ) . unwrap( ) . to_string( ) ] ;
1185
- args. extend ( extra_args. iter ( ) . cloned ( ) ) ;
1186
1163
args. extend ( split_maybe_args ( & props. compile_flags ) . into_iter ( ) ) ;
1187
1164
let args = ProcArgs {
1188
1165
prog : config. rustdoc_path . to_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -1843,7 +1820,7 @@ fn charset() -> &'static str {
1843
1820
}
1844
1821
1845
1822
fn 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) ;
1847
1824
if !proc_res. status . success ( ) {
1848
1825
fatal_proc_rec ( "rustdoc failed!" , & proc_res) ;
1849
1826
}
0 commit comments