Skip to content

Commit 97b542b

Browse files
committed
Android: Pass the environment when running tests
1 parent fcce7e8 commit 97b542b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiletest/runtest.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ fn exec_compiled_test(config: &config, props: &TestProps,
551551

552552
~"arm-linux-androideabi" => {
553553
if (config.adb_device_status) {
554-
_arm_exec_compiled_test(config, props, testfile)
554+
_arm_exec_compiled_test(config, props, testfile, env)
555555
} else {
556556
_dummy_exec_compiled_test(config, props, testfile)
557557
}
@@ -777,7 +777,7 @@ stderr:\n\
777777
}
778778

779779
fn _arm_exec_compiled_test(config: &config, props: &TestProps,
780-
testfile: &Path) -> ProcRes {
780+
testfile: &Path, env: ~[(~str, ~str)]) -> ProcRes {
781781

782782
let args = make_run_args(config, props, testfile);
783783
let cmdline = make_cmdline("", args.prog, args.args);
@@ -803,6 +803,9 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
803803

804804
// run test via adb_run_wrapper
805805
runargs.push(~"shell");
806+
for (key, val) in env.move_iter() {
807+
runargs.push(fmt!("%s=%s", key, val));
808+
}
806809
runargs.push(fmt!("%s/adb_run_wrapper.sh", config.adb_test_dir));
807810
runargs.push(fmt!("%s", config.adb_test_dir));
808811
runargs.push(fmt!("%s", prog_short));

0 commit comments

Comments
 (0)