Skip to content

Commit 18d1f13

Browse files
committed
Auto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichton
jit support was removed from rustc in 6b34ba2 (December 2013), so passing `--jit` wouldn't even work.
2 parents a97b3ff + fe6b30d commit 18d1f13

File tree

3 files changed

+14
-43
lines changed

3 files changed

+14
-43
lines changed

src/compiletest/common.rs

-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ pub struct Config {
127127
// Flags to pass to the compiler when building for the target
128128
pub target_rustcflags: Option<String>,
129129

130-
// Run tests using the JIT
131-
pub jit: bool,
132-
133130
// Target system to be tested
134131
pub target: String,
135132

src/compiletest/compiletest.rs

-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
8080
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
8181
optflag("", "verbose", "run tests verbosely, showing all output"),
8282
optopt("", "logfile", "file to log test execution to", "FILE"),
83-
optflag("", "jit", "run tests under the JIT"),
8483
optopt("", "target", "the target to build for", "TARGET"),
8584
optopt("", "host", "the host to build for", "HOST"),
8685
optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"),
@@ -148,7 +147,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
148147
runtool: matches.opt_str("runtool"),
149148
host_rustcflags: matches.opt_str("host-rustcflags"),
150149
target_rustcflags: matches.opt_str("target-rustcflags"),
151-
jit: matches.opt_present("jit"),
152150
target: opt_str2(matches.opt_str("target")),
153151
host: opt_str2(matches.opt_str("host")),
154152
gdb_version: extract_gdb_version(matches.opt_str("gdb-version")),
@@ -188,7 +186,6 @@ pub fn log_config(config: &Config) {
188186
opt_str(&config.host_rustcflags)));
189187
logv(c, format!("target-rustcflags: {}",
190188
opt_str(&config.target_rustcflags)));
191-
logv(c, format!("jit: {}", config.jit));
192189
logv(c, format!("target: {}", config.target));
193190
logv(c, format!("host: {}", config.host));
194191
logv(c, format!("android-cross-path: {:?}",

src/compiletest/runtest.rs

+14-37
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,13 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
106106
}
107107

108108
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);
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

143139
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);
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

11511139
fn 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

11741152
fn 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

18451822
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);
18471824
if !proc_res.status.success() {
18481825
fatal_proc_rec("rustdoc failed!", &proc_res);
18491826
}

0 commit comments

Comments
 (0)