@@ -42,7 +42,7 @@ use test::MetricMap;
4242pub fn run ( config : Config , testfile : String ) {
4343 match & * config. target {
4444
45- "arm-linux-androideabi" => {
45+ "arm-linux-androideabi" | "aarch64-linux-android" => {
4646 if !config. adb_device_status {
4747 panic ! ( "android device not available" ) ;
4848 }
@@ -382,17 +382,26 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
382382
383383 let debugger_run_result;
384384 match & * config. target {
385- "arm-linux-androideabi" => {
385+ "arm-linux-androideabi" | "aarch64-linux-android" => {
386386
387- cmds = cmds. replace ( "run" , "continue" ) . to_string ( ) ;
387+ cmds = cmds. replace ( "run" , "continue" ) ;
388388
389389 // write debugger script
390- let script_str = [ "set charset UTF-8" . to_string ( ) ,
391- format ! ( "file {}" , exe_file. as_str( ) . unwrap( )
392- . to_string( ) ) ,
393- "target remote :5039" . to_string ( ) ,
394- cmds,
395- "quit" . to_string ( ) ] . connect ( "\n " ) ;
390+ let mut script_str = String :: with_capacity ( 2048 ) ;
391+ script_str. push_str ( "set charset UTF-8\n " ) ;
392+ script_str. push_str ( & format ! ( "file {}\n " , exe_file. as_str( ) . unwrap( ) ) ) ;
393+ script_str. push_str ( "target remote :5039\n " ) ;
394+ script_str. push_str ( & format ! ( "set solib-search-path \
395+ ./{}/stage2/lib/rustlib/{}/lib/\n ",
396+ config. host, config. target) ) ;
397+ for line in breakpoint_lines. iter ( ) {
398+ script_str. push_str ( & format ! ( "break {:?}:{}\n " ,
399+ testfile. filename_display( ) ,
400+ * line) [ ] ) ;
401+ }
402+ script_str. push_str ( & cmds) ;
403+ script_str. push_str ( "quit\n " ) ;
404+
396405 debug ! ( "script_str = {}" , script_str) ;
397406 dump_output_file ( config,
398407 testfile,
@@ -425,8 +434,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
425434 . expect ( & format ! ( "failed to exec `{:?}`" , config. adb_path) ) ;
426435
427436 let adb_arg = format ! ( "export LD_LIBRARY_PATH={}; \
428- gdbserver :5039 {}/{}",
437+ gdbserver{} :5039 {}/{}",
429438 config. adb_test_dir. clone( ) ,
439+ if config. target. contains( "aarch64" )
440+ { "64" } else { "" } ,
430441 config. adb_test_dir. clone( ) ,
431442 str :: from_utf8(
432443 exe_file. filename( )
@@ -470,7 +481,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
470481 format!( "-command={}" , debugger_script. as_str( ) . unwrap( ) ) ) ;
471482
472483 let mut gdb_path = tool_path;
473- gdb_path. push_str ( "/bin/arm-linux-androideabi- gdb" ) ;
484+ gdb_path. push_str ( & format ! ( "/bin/{}- gdb" , config . target ) ) ;
474485 let procsrv:: Result {
475486 out,
476487 err,
@@ -484,7 +495,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
484495 . expect ( & format ! ( "failed to exec `{:?}`" , gdb_path) ) ;
485496 let cmdline = {
486497 let cmdline = make_cmdline ( "" ,
487- "arm-linux-androideabi- gdb",
498+ & format ! ( "{}- gdb", config . target ) ,
488499 & debugger_opts) ;
489500 logv ( config, format ! ( "executing {}" , cmdline) ) ;
490501 cmdline
@@ -496,7 +507,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
496507 stderr : err,
497508 cmdline : cmdline
498509 } ;
499- process. signal_kill ( ) . unwrap ( ) ;
510+ if process. signal_kill ( ) . is_err ( ) {
511+ println ! ( "Adb process is already finished." ) ;
512+ }
500513 }
501514
502515 _=> {
@@ -1135,7 +1148,7 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
11351148
11361149 match & * config. target {
11371150
1138- "arm-linux-androideabi" => {
1151+ "arm-linux-androideabi" | "aarch64-linux-android" => {
11391152 _arm_exec_compiled_test ( config, props, testfile, env)
11401153 }
11411154
@@ -1200,7 +1213,7 @@ fn compose_and_run_compiler(
12001213 }
12011214
12021215 match & * config. target {
1203- "arm-linux-androideabi" => {
1216+ "arm-linux-androideabi" | "aarch64-linux-android" => {
12041217 _arm_push_aux_shared_library ( config, testfile) ;
12051218 }
12061219 _ => { }
@@ -1499,7 +1512,7 @@ fn _arm_exec_compiled_test(config: &Config,
14991512 for ( key, val) in env {
15001513 runargs. push ( format ! ( "{}={}" , key, val) ) ;
15011514 }
1502- runargs. push ( format ! ( "{}/adb_run_wrapper.sh" , config. adb_test_dir) ) ;
1515+ runargs. push ( format ! ( "{}/../ adb_run_wrapper.sh" , config. adb_test_dir) ) ;
15031516 runargs. push ( format ! ( "{}" , config. adb_test_dir) ) ;
15041517 runargs. push ( format ! ( "{}" , prog_short) ) ;
15051518
@@ -1595,7 +1608,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
15951608 file. as_str ( )
15961609 . unwrap ( )
15971610 . to_string ( ) ,
1598- config. adb_test_dir . to_string ( )
1611+ config. adb_test_dir . to_string ( ) ,
15991612 ] ,
16001613 vec ! ( ( "" . to_string( ) ,
16011614 "" . to_string( ) ) ) ,
0 commit comments