diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-05-24 09:51:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-05-31 16:29:47 -0700 |
| commit | caa6aaefa12c67877c05cfc8470affc098eb3573 (patch) | |
| tree | 5fdd0e145cf0f64f0a7452e041e1aaa85330c5bd | |
| parent | 39f3c16cca889ef3f1719d9177e3315258222a65 (diff) | |
| download | rust-caa6aaefa12c67877c05cfc8470affc098eb3573.tar.gz rust-caa6aaefa12c67877c05cfc8470affc098eb3573.zip | |
test: Use `set sysroot` for more NDK compatibility
Recent versions of the Android NDK no longer ship debuggers like `arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can symlink this into place at least to get our detection still working, but it now needs to be told what the sysroot is so it can correctly do... something. Long story short, tests didn't pass with this change and after this change they pass.
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index e6dc3a9d360..88ca0f9caf1 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -433,9 +433,15 @@ actual:\n\ cmds = cmds.replace("run", "continue"); + let tool_path = match self.config.android_cross_path.to_str() { + Some(x) => x.to_owned(), + None => self.fatal("cannot find android cross path") + }; + // write debugger script let mut script_str = String::with_capacity(2048); script_str.push_str(&format!("set charset {}\n", Self::charset())); + script_str.push_str(&format!("set sysroot {}\n", tool_path)); script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap())); script_str.push_str("target remote :5039\n"); script_str.push_str(&format!("set solib-search-path \ @@ -508,11 +514,6 @@ actual:\n\ } } - let tool_path = match self.config.android_cross_path.to_str() { - Some(x) => x.to_owned(), - None => self.fatal("cannot find android cross path") - }; - let debugger_script = self.make_out_name("debugger.script"); // FIXME (#9639): This needs to handle non-utf8 paths let debugger_opts = |
