File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -3,29 +3,33 @@ use std::process::Command;
3
3
use std:: path:: { Path , PathBuf } ;
4
4
5
5
fn main ( ) {
6
- assert_eq ! ( env:: args_os( ) . len( ) , 2 ) ;
7
- let test = PathBuf :: from ( env:: args_os ( ) . nth ( 1 ) . unwrap ( ) ) ;
6
+ let args = env:: args_os ( )
7
+ . skip ( 1 )
8
+ . filter ( |arg| arg != "--quiet" )
9
+ . collect :: < Vec < _ > > ( ) ;
10
+ assert_eq ! ( args. len( ) , 1 ) ;
11
+ let test = PathBuf :: from ( & args[ 0 ] ) ;
8
12
let dst = Path :: new ( "/data/local/tmp" ) . join ( test. file_name ( ) . unwrap ( ) ) ;
9
13
10
14
let status = Command :: new ( "adb" )
11
15
. arg ( "wait-for-device" )
12
16
. status ( )
13
- . expect ( "failed to run rumprun-bake " ) ;
17
+ . expect ( "failed to run: adb wait-for-device " ) ;
14
18
assert ! ( status. success( ) ) ;
15
19
16
20
let status = Command :: new ( "adb" )
17
21
. arg ( "push" )
18
22
. arg ( & test)
19
23
. arg ( & dst)
20
24
. status ( )
21
- . expect ( "failed to run rumprun-bake " ) ;
25
+ . expect ( "failed to run: adb pushr " ) ;
22
26
assert ! ( status. success( ) ) ;
23
27
24
28
let output = Command :: new ( "adb" )
25
29
. arg ( "shell" )
26
30
. arg ( & dst)
27
31
. output ( )
28
- . expect ( "failed to run rumprun-bake " ) ;
32
+ . expect ( "failed to run: adb shell " ) ;
29
33
assert ! ( status. success( ) ) ;
30
34
31
35
println ! ( "status: {}\n stdout ---\n {}\n stderr ---\n {}" ,
You can’t perform that action at this time.
0 commit comments