@@ -230,6 +230,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
230
230
testfile : & Path ,
231
231
src : String ,
232
232
pretty_type : & str ) -> ProcRes {
233
+ let aux_dir = aux_output_dir_name ( config, testfile) ;
233
234
compose_and_run ( config,
234
235
testfile,
235
236
make_pp_args ( config,
@@ -238,6 +239,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
238
239
pretty_type. to_string ( ) ) ,
239
240
props. exec_env . clone ( ) ,
240
241
config. compile_lib_path . as_slice ( ) ,
242
+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
241
243
Some ( src) )
242
244
}
243
245
@@ -354,6 +356,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
354
356
355
357
procsrv:: run ( "" ,
356
358
config. adb_path . as_slice ( ) ,
359
+ None ,
357
360
[
358
361
"push" . to_string ( ) ,
359
362
exe_file. as_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -365,6 +368,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
365
368
366
369
procsrv:: run ( "" ,
367
370
config. adb_path . as_slice ( ) ,
371
+ None ,
368
372
[
369
373
"forward" . to_string ( ) ,
370
374
"tcp:5039" . to_string ( ) ,
@@ -385,6 +389,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
385
389
let mut process = procsrv:: run_background ( "" ,
386
390
config. adb_path
387
391
. as_slice ( ) ,
392
+ None ,
388
393
[
389
394
"shell" . to_string ( ) ,
390
395
adb_arg. clone ( )
@@ -425,6 +430,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
425
430
status
426
431
} = procsrv:: run ( "" ,
427
432
gdb_path. as_slice ( ) ,
433
+ None ,
428
434
debugger_opts. as_slice ( ) ,
429
435
vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
430
436
None )
@@ -486,7 +492,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
486
492
testfile,
487
493
proc_args,
488
494
Vec :: new ( ) ,
489
- "" ,
495
+ config. run_lib_path . as_slice ( ) ,
496
+ None ,
490
497
None ) ;
491
498
}
492
499
}
@@ -994,11 +1001,13 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
994
1001
}
995
1002
996
1003
_=> {
1004
+ let aux_dir = aux_output_dir_name ( config, testfile) ;
997
1005
compose_and_run ( config,
998
1006
testfile,
999
1007
make_run_args ( config, props, testfile) ,
1000
1008
env,
1001
1009
config. run_lib_path . as_slice ( ) ,
1010
+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
1002
1011
None )
1003
1012
}
1004
1013
}
@@ -1045,6 +1054,7 @@ fn compose_and_run_compiler(
1045
1054
aux_args,
1046
1055
Vec :: new ( ) ,
1047
1056
config. compile_lib_path . as_slice ( ) ,
1057
+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
1048
1058
None ) ;
1049
1059
if !auxres. status . success ( ) {
1050
1060
fatal_proc_rec (
@@ -1066,6 +1076,7 @@ fn compose_and_run_compiler(
1066
1076
args,
1067
1077
Vec :: new ( ) ,
1068
1078
config. compile_lib_path . as_slice ( ) ,
1079
+ Some ( aux_dir. as_str ( ) . unwrap ( ) ) ,
1069
1080
input)
1070
1081
}
1071
1082
@@ -1078,9 +1089,10 @@ fn compose_and_run(config: &Config, testfile: &Path,
1078
1089
ProcArgs { args, prog } : ProcArgs ,
1079
1090
procenv : Vec < ( String , String ) > ,
1080
1091
lib_path : & str ,
1092
+ aux_path : Option < & str > ,
1081
1093
input : Option < String > ) -> ProcRes {
1082
1094
return program_output ( config, testfile, lib_path,
1083
- prog, args, procenv, input) ;
1095
+ prog, aux_path , args, procenv, input) ;
1084
1096
}
1085
1097
1086
1098
enum TargetLocation {
@@ -1189,7 +1201,8 @@ fn split_maybe_args(argstr: &Option<String>) -> Vec<String> {
1189
1201
}
1190
1202
1191
1203
fn 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 ) > ,
1193
1206
input : Option < String > ) -> ProcRes {
1194
1207
let cmdline =
1195
1208
{
@@ -1205,6 +1218,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
1205
1218
status
1206
1219
} = procsrv:: run ( lib_path,
1207
1220
prog. as_slice ( ) ,
1221
+ aux_path,
1208
1222
args. as_slice ( ) ,
1209
1223
env,
1210
1224
input) . expect ( format ! ( "failed to exec `{}`" , prog) . as_slice ( ) ) ;
@@ -1326,6 +1340,7 @@ fn _arm_exec_compiled_test(config: &Config,
1326
1340
// copy to target
1327
1341
let copy_result = procsrv:: run ( "" ,
1328
1342
config. adb_path . as_slice ( ) ,
1343
+ None ,
1329
1344
[
1330
1345
"push" . to_string ( ) ,
1331
1346
args. prog . clone ( ) ,
@@ -1361,6 +1376,7 @@ fn _arm_exec_compiled_test(config: &Config,
1361
1376
}
1362
1377
procsrv:: run ( "" ,
1363
1378
config. adb_path . as_slice ( ) ,
1379
+ None ,
1364
1380
runargs. as_slice ( ) ,
1365
1381
vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) , Some ( "" . to_string ( ) ) )
1366
1382
. expect ( format ! ( "failed to exec `{}`" , config. adb_path) . as_slice ( ) ) ;
@@ -1374,6 +1390,7 @@ fn _arm_exec_compiled_test(config: &Config,
1374
1390
let procsrv:: Result { out : exitcode_out, err : _, status : _ } =
1375
1391
procsrv:: run ( "" ,
1376
1392
config. adb_path . as_slice ( ) ,
1393
+ None ,
1377
1394
runargs. as_slice ( ) ,
1378
1395
vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
1379
1396
Some ( "" . to_string ( ) ) )
@@ -1397,6 +1414,7 @@ fn _arm_exec_compiled_test(config: &Config,
1397
1414
let procsrv:: Result { out : stdout_out, err : _, status : _ } =
1398
1415
procsrv:: run ( "" ,
1399
1416
config. adb_path . as_slice ( ) ,
1417
+ None ,
1400
1418
runargs. as_slice ( ) ,
1401
1419
vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
1402
1420
Some ( "" . to_string ( ) ) )
@@ -1411,6 +1429,7 @@ fn _arm_exec_compiled_test(config: &Config,
1411
1429
let procsrv:: Result { out : stderr_out, err : _, status : _ } =
1412
1430
procsrv:: run ( "" ,
1413
1431
config. adb_path . as_slice ( ) ,
1432
+ None ,
1414
1433
runargs. as_slice ( ) ,
1415
1434
vec ! ( ( "" . to_string( ) , "" . to_string( ) ) ) ,
1416
1435
Some ( "" . to_string ( ) ) )
@@ -1438,6 +1457,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
1438
1457
// FIXME (#9639): This needs to handle non-utf8 paths
1439
1458
let copy_result = procsrv:: run ( "" ,
1440
1459
config. adb_path . as_slice ( ) ,
1460
+ None ,
1441
1461
[
1442
1462
"push" . to_string ( ) ,
1443
1463
file. as_str ( )
@@ -1505,7 +1525,7 @@ fn compile_cc_with_clang_and_save_bitcode(config: &Config, _props: &TestProps,
1505
1525
bitcodefile. as_str( ) . unwrap( ) . to_string( ) ,
1506
1526
testcc. as_str( ) . unwrap( ) . to_string( ) )
1507
1527
} ;
1508
- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1528
+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
1509
1529
}
1510
1530
1511
1531
fn extract_function_from_bitcode ( config : & Config , _props : & TestProps ,
@@ -1522,7 +1542,7 @@ fn extract_function_from_bitcode(config: &Config, _props: &TestProps,
1522
1542
format!( "-o={}" , extracted_bc. as_str( ) . unwrap( ) ) ,
1523
1543
bitcodefile. as_str( ) . unwrap( ) . to_string( ) )
1524
1544
} ;
1525
- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1545
+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
1526
1546
}
1527
1547
1528
1548
fn disassemble_extract ( config : & Config , _props : & TestProps ,
@@ -1538,7 +1558,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
1538
1558
args : vec ! ( format!( "-o={}" , extracted_ll. as_str( ) . unwrap( ) ) ,
1539
1559
extracted_bc. as_str( ) . unwrap( ) . to_string( ) )
1540
1560
} ;
1541
- compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None )
1561
+ compose_and_run ( config, testfile, proc_args, Vec :: new ( ) , "" , None , None )
1542
1562
}
1543
1563
1544
1564
0 commit comments