@@ -230,6 +230,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
230230 testfile : & Path ,
231231 src : String ,
232232 pretty_type : & str ) -> ProcRes {
233+ let aux_dir = aux_output_dir_name ( config, testfile) ;
233234 compose_and_run ( config,
234235 testfile,
235236 make_pp_args ( config,
@@ -238,6 +239,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
238239 pretty_type. to_string ( ) ) ,
239240 props. exec_env . clone ( ) ,
240241 config. compile_lib_path . as_slice ( ) ,
242+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
241243 Some ( src) )
242244 }
243245
@@ -354,6 +356,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
354356
355357 procsrv:: run ( "" ,
356358 config. adb_path . as_slice ( ) ,
359+ None ,
357360 [
358361 "push" . to_string ( ) ,
359362 exe_file. as_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -365,6 +368,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
365368
366369 procsrv:: run ( "" ,
367370 config. adb_path . as_slice ( ) ,
371+ None ,
368372 [
369373 "forward" . to_string ( ) ,
370374 "tcp:5039" . to_string ( ) ,
@@ -385,6 +389,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
385389 let mut process = procsrv:: run_background ( "" ,
386390 config. adb_path
387391 . as_slice ( ) ,
392+ None ,
388393 [
389394 "shell" . to_string ( ) ,
390395 adb_arg. clone ( )
@@ -425,6 +430,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
425430 status
426431 } = procsrv:: run ( "" ,
427432 gdb_path. as_slice ( ) ,
433+ None ,
428434 debugger_opts. as_slice ( ) ,
429435 vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
430436 None )
@@ -486,7 +492,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
486492 testfile,
487493 proc_args,
488494 Vec :: new ( ) ,
489- "" ,
495+ config. run_lib_path . as_slice ( ) ,
496+ None ,
490497 None ) ;
491498 }
492499 }
@@ -994,11 +1001,13 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
9941001 }
9951002
9961003 _=> {
1004+ let aux_dir = aux_output_dir_name ( config, testfile) ;
9971005 compose_and_run ( config,
9981006 testfile,
9991007 make_run_args ( config, props, testfile) ,
10001008 env,
10011009 config. run_lib_path . as_slice ( ) ,
1010+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
10021011 None )
10031012 }
10041013 }
@@ -1045,6 +1054,7 @@ fn compose_and_run_compiler(
10451054 aux_args,
10461055 Vec :: new ( ) ,
10471056 config. compile_lib_path . as_slice ( ) ,
1057+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
10481058 None ) ;
10491059 if !auxres. status . success ( ) {
10501060 fatal_proc_rec (
@@ -1066,6 +1076,7 @@ fn compose_and_run_compiler(
10661076 args,
10671077 Vec :: new ( ) ,
10681078 config. compile_lib_path . as_slice ( ) ,
1079+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
10691080 input)
10701081}
10711082
@@ -1078,9 +1089,10 @@ fn compose_and_run(config: &Config, testfile: &Path,
10781089 ProcArgs { args, prog } : ProcArgs ,
10791090 procenv : Vec < ( String , String ) > ,
10801091 lib_path : & str ,
1092+ aux_path : Option < & str > ,
10811093 input : Option < String > ) -> ProcRes {
10821094 return program_output ( config, testfile, lib_path,
1083- prog, args, procenv, input) ;
1095+ prog, aux_path , args, procenv, input) ;
10841096}
10851097
10861098enum TargetLocation {
@@ -1189,7 +1201,8 @@ fn split_maybe_args(argstr: &Option<String>) -> Vec<String> {
11891201}
11901202
11911203fn program_output ( config : & Config , testfile : & Path , lib_path : & str , prog : String ,
1192- args : Vec < String > , env : Vec < ( String , String ) > ,
1204+ aux_path : Option < & str > , args : Vec < String > ,
1205+ env : Vec < ( String , String ) > ,
11931206 input : Option < String > ) -> ProcRes {
11941207 let cmdline =
11951208 {
@@ -1205,6 +1218,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
12051218 status
12061219 } = procsrv:: run ( lib_path,
12071220 prog. as_slice ( ) ,
1221+ aux_path,
12081222 args. as_slice ( ) ,
12091223 env,
12101224 input) . expect ( format ! ( "failed to exec `{}`" , prog) . as_slice ( ) ) ;
@@ -1326,6 +1340,7 @@ fn _arm_exec_compiled_test(config: &Config,
13261340 // copy to target
13271341 let copy_result = procsrv:: run ( "" ,
13281342 config. adb_path . as_slice ( ) ,
1343+ None ,
13291344 [
13301345 "push" . to_string ( ) ,
13311346 args. prog . clone ( ) ,
@@ -1361,6 +1376,7 @@ fn _arm_exec_compiled_test(config: &Config,
13611376 }
13621377 procsrv:: run ( "" ,
13631378 config. adb_path . as_slice ( ) ,
1379+ None ,
13641380 runargs. as_slice ( ) ,
13651381 vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) , Some ( "" . to_string ( ) ) )
13661382 . expect ( format ! ( "failed to exec `{}`" , config. adb_path) . as_slice ( ) ) ;
@@ -1374,6 +1390,7 @@ fn _arm_exec_compiled_test(config: &Config,
13741390 let procsrv:: Result { out : exitcode_out, err : _, status : _ } =
13751391 procsrv:: run ( "" ,
13761392 config. adb_path . as_slice ( ) ,
1393+ None ,
13771394 runargs. as_slice ( ) ,
13781395 vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
13791396 Some ( "" . to_string ( ) ) )
@@ -1397,6 +1414,7 @@ fn _arm_exec_compiled_test(config: &Config,
13971414 let procsrv:: Result { out : stdout_out, err : _, status : _ } =
13981415 procsrv:: run ( "" ,
13991416 config. adb_path . as_slice ( ) ,
1417+ None ,
14001418 runargs. as_slice ( ) ,
14011419 vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
14021420 Some ( "" . to_string ( ) ) )
@@ -1411,6 +1429,7 @@ fn _arm_exec_compiled_test(config: &Config,
14111429 let procsrv:: Result { out : stderr_out, err : _, status : _ } =
14121430 procsrv:: run ( "" ,
14131431 config. adb_path . as_slice ( ) ,
1432+ None ,
14141433 runargs. as_slice ( ) ,
14151434 vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
14161435 Some ( "" . to_string ( ) ) )
@@ -1438,6 +1457,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
14381457 // FIXME (#9639): This needs to handle non-utf8 paths
14391458 let copy_result = procsrv:: run ( "" ,
14401459 config. adb_path . as_slice ( ) ,
1460+ None ,
14411461 [
14421462 "push" . to_string ( ) ,
14431463 file. as_str ( )
@@ -1505,7 +1525,7 @@ fn compile_cc_with_clang_and_save_bitcode(config: &Config, _props: &TestProps,
15051525 bitcodefile. as_str( ) . unwrap( ) . to_string( ) ,
15061526 testcc. as_str( ) . unwrap( ) . to_string( ) )
15071527 } ;
1508- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1528+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
15091529}
15101530
15111531fn extract_function_from_bitcode ( config : & Config , _props : & TestProps ,
@@ -1522,7 +1542,7 @@ fn extract_function_from_bitcode(config: &Config, _props: &TestProps,
15221542 format!( "-o={}" , extracted_bc. as_str( ) . unwrap( ) ) ,
15231543 bitcodefile. as_str( ) . unwrap( ) . to_string( ) )
15241544 } ;
1525- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1545+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
15261546}
15271547
15281548fn disassemble_extract ( config : & Config , _props : & TestProps ,
@@ -1538,7 +1558,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
15381558 args : vec ! ( format!( "-o={}" , extracted_ll. as_str( ) . unwrap( ) ) ,
15391559 extracted_bc. as_str( ) . unwrap( ) . to_string( ) )
15401560 } ;
1541- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1561+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
15421562}
15431563
15441564
0 commit comments