From fcce7e82dbbe6fe4a0230eeda1d2d6f4eb8ec81a Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Wed, 28 Aug 2013 21:25:12 +0900 Subject: [PATCH 1/2] Remove --newrt option --- src/compiletest/common.rs | 3 --- src/compiletest/compiletest.rs | 3 --- src/compiletest/runtest.rs | 2 -- 3 files changed, 8 deletions(-) diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs index 3ae3600cf88..6a365ae05dd 100644 --- a/src/compiletest/common.rs +++ b/src/compiletest/common.rs @@ -83,9 +83,6 @@ pub struct config { // Run tests using the JIT jit: bool, - // Run tests using the new runtime - newrt: bool, - // Target system to be tested target: ~str, diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 8de79749b54..be8f9655010 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -71,7 +71,6 @@ pub fn parse_config(args: ~[~str]) -> config { optopt("", "ratchet-noise-percent", "percent change in metrics to consider noise", "N"), optflag("", "jit", "run tests under the JIT"), - optflag("", "newrt", "run tests on the new runtime / scheduler"), optopt("", "target", "the target to build for", "TARGET"), optopt("", "adb-path", "path to the android debugger", "PATH"), optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"), @@ -135,7 +134,6 @@ pub fn parse_config(args: ~[~str]) -> config { runtool: getopts::opt_maybe_str(matches, "runtool"), rustcflags: getopts::opt_maybe_str(matches, "rustcflags"), jit: getopts::opt_present(matches, "jit"), - newrt: getopts::opt_present(matches, "newrt"), target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(), adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(), adb_test_dir: @@ -169,7 +167,6 @@ pub fn log_config(config: &config) { logv(c, fmt!("runtool: %s", opt_str(&config.runtool))); logv(c, fmt!("rustcflags: %s", opt_str(&config.rustcflags))); logv(c, fmt!("jit: %b", config.jit)); - logv(c, fmt!("newrt: %b", config.newrt)); logv(c, fmt!("target: %s", config.target)); logv(c, fmt!("adb_path: %s", config.adb_path)); logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir)); diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index a31efe26c1a..555ffde029f 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -545,9 +545,7 @@ fn compile_test_(config: &config, props: &TestProps, fn exec_compiled_test(config: &config, props: &TestProps, testfile: &Path) -> ProcRes { - // If testing the new runtime then set the RUST_NEWRT env var let env = props.exec_env.clone(); - let env = if config.newrt { env + &[(~"RUST_NEWRT", ~"1")] } else { env }; match config.target { From 97b542bd84623e8bc55aa894e53722c7bf7de6c6 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Wed, 28 Aug 2013 21:44:55 +0900 Subject: [PATCH 2/2] Android: Pass the environment when running tests --- src/compiletest/runtest.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 555ffde029f..5467995a6b5 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -551,7 +551,7 @@ fn exec_compiled_test(config: &config, props: &TestProps, ~"arm-linux-androideabi" => { if (config.adb_device_status) { - _arm_exec_compiled_test(config, props, testfile) + _arm_exec_compiled_test(config, props, testfile, env) } else { _dummy_exec_compiled_test(config, props, testfile) } @@ -777,7 +777,7 @@ stderr:\n\ } fn _arm_exec_compiled_test(config: &config, props: &TestProps, - testfile: &Path) -> ProcRes { + testfile: &Path, env: ~[(~str, ~str)]) -> ProcRes { let args = make_run_args(config, props, testfile); let cmdline = make_cmdline("", args.prog, args.args); @@ -803,6 +803,9 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps, // run test via adb_run_wrapper runargs.push(~"shell"); + for (key, val) in env.move_iter() { + runargs.push(fmt!("%s=%s", key, val)); + } runargs.push(fmt!("%s/adb_run_wrapper.sh", config.adb_test_dir)); runargs.push(fmt!("%s", config.adb_test_dir)); runargs.push(fmt!("%s", prog_short));