@@ -334,7 +334,8 @@ impl<'test> TestCx<'test> {
334
334
self . props . exec_env . clone ( ) ,
335
335
self . config . compile_lib_path . to_str ( ) . unwrap ( ) ,
336
336
Some ( aux_dir. to_str ( ) . unwrap ( ) ) ,
337
- Some ( src) )
337
+ Some ( src) ,
338
+ None )
338
339
}
339
340
340
341
fn make_pp_args ( & self ,
@@ -690,6 +691,7 @@ actual:\n\
690
691
environment,
691
692
self . config . run_lib_path . to_str ( ) . unwrap ( ) ,
692
693
None ,
694
+ None ,
693
695
None ) ;
694
696
}
695
697
}
@@ -1235,15 +1237,21 @@ actual:\n\
1235
1237
env,
1236
1238
self . config . run_lib_path . to_str ( ) . unwrap ( ) ,
1237
1239
Some ( aux_dir. to_str ( ) . unwrap ( ) ) ,
1240
+ None ,
1238
1241
None )
1239
1242
}
1240
1243
_ => {
1241
1244
let aux_dir = self . aux_output_dir_name ( ) ;
1245
+ let working_dir =
1246
+ Some ( self . output_base_name ( )
1247
+ . parent ( ) . unwrap ( )
1248
+ . to_str ( ) . unwrap ( ) . to_owned ( ) ) ;
1242
1249
self . compose_and_run ( self . make_run_args ( ) ,
1243
1250
env,
1244
1251
self . config . run_lib_path . to_str ( ) . unwrap ( ) ,
1245
1252
Some ( aux_dir. to_str ( ) . unwrap ( ) ) ,
1246
- None )
1253
+ None ,
1254
+ working_dir)
1247
1255
}
1248
1256
}
1249
1257
}
@@ -1321,6 +1329,7 @@ actual:\n\
1321
1329
Vec :: new ( ) ,
1322
1330
aux_cx. config . compile_lib_path . to_str ( ) . unwrap ( ) ,
1323
1331
Some ( aux_dir. to_str ( ) . unwrap ( ) ) ,
1332
+ None ,
1324
1333
None ) ;
1325
1334
if !auxres. status . success ( ) {
1326
1335
self . fatal_proc_rec (
@@ -1334,16 +1343,18 @@ actual:\n\
1334
1343
self . props . rustc_env . clone ( ) ,
1335
1344
self . config . compile_lib_path . to_str ( ) . unwrap ( ) ,
1336
1345
Some ( aux_dir. to_str ( ) . unwrap ( ) ) ,
1337
- input)
1346
+ input,
1347
+ None )
1338
1348
}
1339
1349
1340
1350
fn compose_and_run ( & self ,
1341
1351
ProcArgs { args, prog } : ProcArgs ,
1342
1352
procenv : Vec < ( String , String ) > ,
1343
1353
lib_path : & str ,
1344
1354
aux_path : Option < & str > ,
1345
- input : Option < String > ) -> ProcRes {
1346
- self . program_output ( lib_path, prog, aux_path, args, procenv, input)
1355
+ input : Option < String > ,
1356
+ working_dir : Option < String > ) -> ProcRes {
1357
+ self . program_output ( lib_path, prog, aux_path, args, procenv, input, working_dir)
1347
1358
}
1348
1359
1349
1360
fn make_compile_args ( & self ,
@@ -1536,7 +1547,8 @@ actual:\n\
1536
1547
aux_path : Option < & str > ,
1537
1548
args : Vec < String > ,
1538
1549
env : Vec < ( String , String ) > ,
1539
- input : Option < String > )
1550
+ input : Option < String > ,
1551
+ working_dir : Option < String > )
1540
1552
-> ProcRes {
1541
1553
let cmdline =
1542
1554
{
@@ -1546,8 +1558,6 @@ actual:\n\
1546
1558
logv ( self . config , format ! ( "executing {}" , cmdline) ) ;
1547
1559
cmdline
1548
1560
} ;
1549
- let working_dir =
1550
- Some ( self . output_base_name ( ) . parent ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) . to_owned ( ) ) ;
1551
1561
1552
1562
let procsrv:: Result {
1553
1563
out,
@@ -1723,7 +1733,7 @@ actual:\n\
1723
1733
args : vec ! [ format!( "-input-file={}" , irfile. to_str( ) . unwrap( ) ) ,
1724
1734
self . testpaths. file. to_str( ) . unwrap( ) . to_owned( ) ]
1725
1735
} ;
1726
- self . compose_and_run ( proc_args, Vec :: new ( ) , "" , None , None )
1736
+ self . compose_and_run ( proc_args, Vec :: new ( ) , "" , None , None , None )
1727
1737
}
1728
1738
1729
1739
fn run_codegen_test ( & self ) {
0 commit comments