diff options
| author | Eunji Jeong <eun-ji.jeong@samsung.com> | 2015-01-22 21:39:06 +0900 |
|---|---|---|
| committer | Eunji Jeong <eun-ji.jeong@samsung.com> | 2015-02-10 15:48:05 +0900 |
| commit | 5cbdf1db9bde6ffb8da4327974c2f5bb105c108a (patch) | |
| tree | 8e404a588d0e14cc094a9fcd652a3a8764db9b3a /src/compiletest | |
| parent | 134e00be7751a9fdc820981962e4fd7ea97bfff6 (diff) | |
Make aarch64-linux-android check with real target
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/compiletest.rs | 16 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 12 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index e6d2a691cf5..1e9f843db34 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -158,10 +158,8 @@ pub fn parse_config(args: Vec<String> ) -> Config { adb_path: opt_str2(matches.opt_str("adb-path")), adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")), adb_device_status: - "arm-linux-androideabi" == - opt_str2(matches.opt_str("target")) && - "(none)" != - opt_str2(matches.opt_str("adb-test-dir")) && + opt_str2(matches.opt_str("target")).contains("android") && + "(none)" != opt_str2(matches.opt_str("adb-test-dir")) && !opt_str2(matches.opt_str("adb-test-dir")).is_empty(), lldb_python_dir: matches.opt_str("lldb-python-dir"), verbose: matches.opt_present("verbose"), @@ -216,17 +214,17 @@ pub fn opt_str2(maybestr: Option<String>) -> String { } pub fn run_tests(config: &Config) { - if config.target == "arm-linux-androideabi" { + if config.target.contains("android") { match config.mode { DebugInfoGdb => { - println!("arm-linux-androideabi debug-info \ - test uses tcp 5039 port. please reserve it"); + println!("{} debug-info test uses tcp 5039 port.\ + please reserve it", config.target); } _ =>{} } - //arm-linux-androideabi debug-info test uses remote debugger - //so, we test 1 task at once. + // android debug-info test uses remote debugger + // so, we test 1 task at once. // also trying to isolate problems with adb_run_wrapper.sh ilooping env::set_var("RUST_TEST_TASKS","1"); } diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 5a372fd7cdc..047d84f1eca 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -42,7 +42,7 @@ use test::MetricMap; pub fn run(config: Config, testfile: String) { match &*config.target { - "arm-linux-androideabi" => { + "arm-linux-androideabi" | "aarch64-linux-android" => { if !config.adb_device_status { panic!("android device not available"); } @@ -382,7 +382,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { let debugger_run_result; match &*config.target { - "arm-linux-androideabi" => { + "arm-linux-androideabi" | "aarch64-linux-android" => { cmds = cmds.replace("run", "continue").to_string(); @@ -470,7 +470,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { format!("-command={}", debugger_script.as_str().unwrap())); let mut gdb_path = tool_path; - gdb_path.push_str("/bin/arm-linux-androideabi-gdb"); + gdb_path.push_str(&format!("/bin/{}-gdb", config.target)); let procsrv::Result { out, err, @@ -484,7 +484,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { .expect(&format!("failed to exec `{:?}`", gdb_path)); let cmdline = { let cmdline = make_cmdline("", - "arm-linux-androideabi-gdb", + &format!("{}-gdb", config.target), &debugger_opts); logv(config, format!("executing {}", cmdline)); cmdline @@ -1135,7 +1135,7 @@ fn exec_compiled_test(config: &Config, props: &TestProps, match &*config.target { - "arm-linux-androideabi" => { + "arm-linux-androideabi" | "aarch64-linux-android" => { _arm_exec_compiled_test(config, props, testfile, env) } @@ -1200,7 +1200,7 @@ fn compose_and_run_compiler( } match &*config.target { - "arm-linux-androideabi" => { + "arm-linux-androideabi" | "aarch64-linux-android" => { _arm_push_aux_shared_library(config, testfile); } _ => {} |
