Skip to content

Commit

Permalink
compiletest: remove JIT
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Jun 13, 2015
1 parent a279826 commit 7f04b8f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 34 deletions.
3 changes: 0 additions & 3 deletions src/compiletest/common.rs
Expand Up @@ -124,9 +124,6 @@ pub struct Config {
// Flags to pass to the compiler when building for the target
pub target_rustcflags: Option<String>,

// Run tests using the JIT
pub jit: bool,

// Target system to be tested
pub target: String,

Expand Down
3 changes: 0 additions & 3 deletions src/compiletest/compiletest.rs
Expand Up @@ -79,7 +79,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
optflag("", "verbose", "run tests verbosely, showing all output"),
optopt("", "logfile", "file to log test execution to", "FILE"),
optflag("", "jit", "run tests under the JIT"),
optopt("", "target", "the target to build for", "TARGET"),
optopt("", "host", "the host to build for", "HOST"),
optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"),
Expand Down Expand Up @@ -146,7 +145,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
runtool: matches.opt_str("runtool"),
host_rustcflags: matches.opt_str("host-rustcflags"),
target_rustcflags: matches.opt_str("target-rustcflags"),
jit: matches.opt_present("jit"),
target: opt_str2(matches.opt_str("target")),
host: opt_str2(matches.opt_str("host")),
gdb_version: extract_gdb_version(matches.opt_str("gdb-version")),
Expand Down Expand Up @@ -186,7 +184,6 @@ pub fn log_config(config: &Config) {
opt_str(&config.host_rustcflags)));
logv(c, format!("target-rustcflags: {}",
opt_str(&config.target_rustcflags)));
logv(c, format!("jit: {}", config.jit));
logv(c, format!("target: {}", config.target));
logv(c, format!("host: {}", config.host));
logv(c, format!("android-cross-path: {:?}",
Expand Down
40 changes: 12 additions & 28 deletions src/compiletest/runtest.rs
Expand Up @@ -98,17 +98,13 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
}

fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
let proc_res = if !config.jit {
let proc_res = compile_test(config, props, testfile);
let proc_res = compile_test(config, props, testfile);

if !proc_res.status.success() {
fatal_proc_rec("compilation failed!", &proc_res);
}
if !proc_res.status.success() {
fatal_proc_rec("compilation failed!", &proc_res);
}

exec_compiled_test(config, props, testfile)
} else {
jit_test(config, props, testfile)
};
let proc_res = exec_compiled_test(config, props, testfile);

// The value our Makefile configures valgrind to return on failure
const VALGRIND_ERR: i32 = 100;
Expand All @@ -133,24 +129,16 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
}

fn run_rpass_test(config: &Config, props: &TestProps, testfile: &Path) {
if !config.jit {
let mut proc_res = compile_test(config, props, testfile);

if !proc_res.status.success() {
fatal_proc_rec("compilation failed!", &proc_res);
}
let proc_res = compile_test(config, props, testfile);

proc_res = exec_compiled_test(config, props, testfile);
if !proc_res.status.success() {
fatal_proc_rec("compilation failed!", &proc_res);
}

if !proc_res.status.success() {
fatal_proc_rec("test run failed!", &proc_res);
}
} else {
let proc_res = jit_test(config, props, testfile);
let proc_res = exec_compiled_test(config, props, testfile);

if !proc_res.status.success() {
fatal_proc_rec("jit failed!", &proc_res);
}
if !proc_res.status.success() {
fatal_proc_rec("test run failed!", &proc_res);
}
}

Expand Down Expand Up @@ -1141,10 +1129,6 @@ fn compile_test(config: &Config, props: &TestProps,
compile_test_(config, props, testfile, &[])
}

fn jit_test(config: &Config, props: &TestProps, testfile: &Path) -> ProcRes {
compile_test_(config, props, testfile, &["--jit".to_string()])
}

fn compile_test_(config: &Config, props: &TestProps,
testfile: &Path, extra_args: &[String]) -> ProcRes {
let aux_dir = aux_output_dir_name(config, testfile);
Expand Down

0 comments on commit 7f04b8f

Please sign in to comment.