@@ -322,7 +322,7 @@ struct TestRunner {
322
322
out_dir : PathBuf ,
323
323
jit_supported : bool ,
324
324
rust_flags : String ,
325
- run_wrapper : String ,
325
+ run_wrapper : Vec < String > ,
326
326
host_triple : String ,
327
327
target_triple : String ,
328
328
}
@@ -339,18 +339,18 @@ impl TestRunner {
339
339
let jit_supported = target_triple. contains ( "x86_64" ) && is_native;
340
340
341
341
let mut rust_flags = env:: var ( "RUSTFLAGS" ) . ok ( ) . unwrap_or ( "" . to_string ( ) ) ;
342
- let mut run_wrapper = String :: new ( ) ;
342
+ let mut run_wrapper = Vec :: new ( ) ;
343
343
344
344
if !is_native {
345
345
match target_triple. as_str ( ) {
346
346
"aarch64-unknown-linux-gnu" => {
347
347
// We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
348
- rust_flags = format ! ( "-Clinker=aarch64-linux-gnu-gcc {}" , rust_flags) ;
349
- run_wrapper = "qemu-aarch64 -L /usr/aarch64-linux-gnu" . to_string ( ) ;
348
+ rust_flags = format ! ( "-Clinker=aarch64-linux-gnu-gcc{}" , rust_flags) ;
349
+ run_wrapper = vec ! [ "qemu-aarch64" , "-L" , " /usr/aarch64-linux-gnu"] ;
350
350
} ,
351
351
"x86_64-pc-windows-gnu" => {
352
352
// We are cross-compiling for Windows. Run tests in wine.
353
- run_wrapper = "wine" . to_string ( ) ;
353
+ run_wrapper = vec ! [ "wine" ] ;
354
354
}
355
355
_ => {
356
356
println ! ( "Unknown non-native platform" ) ;
@@ -368,7 +368,7 @@ impl TestRunner {
368
368
out_dir,
369
369
jit_supported,
370
370
rust_flags,
371
- run_wrapper,
371
+ run_wrapper : run_wrapper . iter ( ) . map ( |s| s . to_string ( ) ) . collect ( ) ,
372
372
host_triple,
373
373
target_triple,
374
374
}
@@ -446,7 +446,7 @@ impl TestRunner {
446
446
447
447
// Prepend the RUN_WRAPPER's
448
448
if !self . run_wrapper . is_empty ( ) {
449
- full_cmd. push ( self . run_wrapper . clone ( ) ) ;
449
+ full_cmd. extend ( self . run_wrapper . iter ( ) . cloned ( ) ) ;
450
450
}
451
451
452
452
full_cmd. push ( {
@@ -459,6 +459,7 @@ impl TestRunner {
459
459
full_cmd. push ( arg. to_string ( ) ) ;
460
460
}
461
461
462
+ println ! ( "full_CMD: {:?}" , full_cmd) ;
462
463
let mut cmd_iter = full_cmd. into_iter ( ) ;
463
464
let first = cmd_iter. next ( ) . unwrap ( ) ;
464
465
0 commit comments