File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1762,7 +1762,7 @@ impl Step for Crate {
1762
1762
} else if builder. remote_tested ( target) {
1763
1763
cargo. env (
1764
1764
format ! ( "CARGO_TARGET_{}_RUNNER" , envify( & target) ) ,
1765
- format ! ( "{} run" , builder. tool_exe( Tool :: RemoteTestClient ) . display( ) ) ,
1765
+ format ! ( "{} run 0 " , builder. tool_exe( Tool :: RemoteTestClient ) . display( ) ) ,
1766
1766
) ;
1767
1767
}
1768
1768
Original file line number Diff line number Diff line change @@ -1608,8 +1608,7 @@ impl<'test> TestCx<'test> {
1608
1608
let mut test_client =
1609
1609
Command :: new ( self . config . remote_test_client . as_ref ( ) . unwrap ( ) ) ;
1610
1610
test_client
1611
- . args ( & [ "run" , & prog] )
1612
- . arg ( support_libs. len ( ) . to_string ( ) )
1611
+ . args ( & [ "run" , & support_libs. len ( ) . to_string ( ) , & prog] )
1613
1612
. args ( support_libs)
1614
1613
. args ( args)
1615
1614
. envs ( env. clone ( ) ) ;
Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ fn main() {
45
45
) ,
46
46
"push" => push ( Path :: new ( & args. next ( ) . unwrap ( ) ) ) ,
47
47
"run" => run (
48
- args. next ( ) . unwrap ( ) ,
49
48
args. next ( ) . and_then ( |count| count. parse ( ) . ok ( ) ) . unwrap ( ) ,
49
+ // the last required parameter must remain the executable
50
+ // path so that the client works as a cargo runner
51
+ args. next ( ) . unwrap ( ) ,
50
52
args. collect ( ) ,
51
53
) ,
52
54
"help" | "-h" | "--help" => help ( ) ,
@@ -201,7 +203,7 @@ fn push(path: &Path) {
201
203
println ! ( "done pushing {:?}" , path) ;
202
204
}
203
205
204
- fn run ( exe : String , support_lib_count : usize , all_args : Vec < String > ) {
206
+ fn run ( support_lib_count : usize , exe : String , all_args : Vec < String > ) {
205
207
let device_address = env:: var ( REMOTE_ADDR_ENV ) . unwrap_or ( DEFAULT_ADDR . to_string ( ) ) ;
206
208
let client = t ! ( TcpStream :: connect( device_address) ) ;
207
209
let mut client = BufWriter :: new ( client) ;
@@ -306,7 +308,7 @@ Usage: {0} <command> [<args>]
306
308
Sub-commands:
307
309
spawn-emulator <target> <server> <tmpdir> [rootfs] See below
308
310
push <path> Copy <path> to emulator
309
- run <file > <support_lib_count > [support_libs...] [args...]
311
+ run <support_lib_count > <file > [support_libs...] [args...]
310
312
Run program on emulator
311
313
help Display help message
312
314
You can’t perform that action at this time.
0 commit comments