Auto merge of #26278 - tamird:compiletest, r=alexcrichton

This commit is contained in:
bors 2015-06-13 23:35:28 +00:00
commit 6e7fcc44ae
3 changed files with 12 additions and 34 deletions

View File

@ -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,

View File

@ -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"),
@ -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")),
@ -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: {:?}",

View File

@ -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);
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;
@ -133,25 +129,17 @@ 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);
let proc_res = compile_test(config, props, testfile);
if !proc_res.status.success() {
fatal_proc_rec("compilation failed!", &proc_res);
}
proc_res = exec_compiled_test(config, props, testfile);
let proc_res = exec_compiled_test(config, props, testfile);
if !proc_res.status.success() {
fatal_proc_rec("test run failed!", &proc_res);
}
} else {
let proc_res = jit_test(config, props, testfile);
if !proc_res.status.success() {
fatal_proc_rec("jit failed!", &proc_res);
}
}
}
fn run_valgrind_test(config: &Config, props: &TestProps, testfile: &Path) {
@ -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);