Skip to content

Commit 974f854

Browse files
committed
auto merge of #8839 : sanxiyn/rust/env, r=thestinger
2 parents ed422b8 + 97b542b commit 974f854

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/compiletest/common.rs

-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ pub struct config {
8383
// Run tests using the JIT
8484
jit: bool,
8585

86-
// Run tests using the new runtime
87-
newrt: bool,
88-
8986
// Target system to be tested
9087
target: ~str,
9188

src/compiletest/compiletest.rs

-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ pub fn parse_config(args: ~[~str]) -> config {
7171
optopt("", "ratchet-noise-percent",
7272
"percent change in metrics to consider noise", "N"),
7373
optflag("", "jit", "run tests under the JIT"),
74-
optflag("", "newrt", "run tests on the new runtime / scheduler"),
7574
optopt("", "target", "the target to build for", "TARGET"),
7675
optopt("", "adb-path", "path to the android debugger", "PATH"),
7776
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
@@ -137,7 +136,6 @@ pub fn parse_config(args: ~[~str]) -> config {
137136
runtool: getopts::opt_maybe_str(matches, "runtool"),
138137
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
139138
jit: getopts::opt_present(matches, "jit"),
140-
newrt: getopts::opt_present(matches, "newrt"),
141139
target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(),
142140
adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(),
143141
adb_test_dir:
@@ -171,7 +169,6 @@ pub fn log_config(config: &config) {
171169
logv(c, fmt!("runtool: %s", opt_str(&config.runtool)));
172170
logv(c, fmt!("rustcflags: %s", opt_str(&config.rustcflags)));
173171
logv(c, fmt!("jit: %b", config.jit));
174-
logv(c, fmt!("newrt: %b", config.newrt));
175172
logv(c, fmt!("target: %s", config.target));
176173
logv(c, fmt!("adb_path: %s", config.adb_path));
177174
logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir));

src/compiletest/runtest.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -547,15 +547,13 @@ fn compile_test_(config: &config, props: &TestProps,
547547
fn exec_compiled_test(config: &config, props: &TestProps,
548548
testfile: &Path) -> ProcRes {
549549

550-
// If testing the new runtime then set the RUST_NEWRT env var
551550
let env = props.exec_env.clone();
552-
let env = if config.newrt { env + &[(~"RUST_NEWRT", ~"1")] } else { env };
553551

554552
match config.target {
555553

556554
~"arm-linux-androideabi" => {
557555
if (config.adb_device_status) {
558-
_arm_exec_compiled_test(config, props, testfile)
556+
_arm_exec_compiled_test(config, props, testfile, env)
559557
} else {
560558
_dummy_exec_compiled_test(config, props, testfile)
561559
}
@@ -781,7 +779,7 @@ stderr:\n\
781779
}
782780

783781
fn _arm_exec_compiled_test(config: &config, props: &TestProps,
784-
testfile: &Path) -> ProcRes {
782+
testfile: &Path, env: ~[(~str, ~str)]) -> ProcRes {
785783

786784
let args = make_run_args(config, props, testfile);
787785
let cmdline = make_cmdline("", args.prog, args.args);
@@ -807,6 +805,9 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
807805

808806
// run test via adb_run_wrapper
809807
runargs.push(~"shell");
808+
for (key, val) in env.move_iter() {
809+
runargs.push(fmt!("%s=%s", key, val));
810+
}
810811
runargs.push(fmt!("%s/adb_run_wrapper.sh", config.adb_test_dir));
811812
runargs.push(fmt!("%s", config.adb_test_dir));
812813
runargs.push(fmt!("%s", prog_short));

0 commit comments

Comments
 (0)