File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fn main() {
2222 . arg ( & test)
2323 . arg ( & dst)
2424 . status ( )
25- . expect ( "failed to run: adb pushr " ) ;
25+ . expect ( "failed to run: adb push " ) ;
2626 assert ! ( status. success( ) ) ;
2727
2828 let output = Command :: new ( "adb" )
@@ -33,16 +33,17 @@ fn main() {
3333 . expect ( "failed to run: adb shell" ) ;
3434 assert ! ( status. success( ) ) ;
3535
36+ let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
37+ let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
38+
3639 println ! ( "status: {}\n stdout ---\n {}\n stderr ---\n {}" ,
3740 output. status,
38- String :: from_utf8_lossy ( & output . stdout) ,
39- String :: from_utf8_lossy ( & output . stderr) ) ;
41+ stdout,
42+ stderr) ;
4043
41- let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
42- stdout. lines ( ) . find ( |l|
43- ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) ||
44- l. starts_with ( "test result: ok" )
45- ) . unwrap_or_else ( || {
44+ if !stderr. lines ( ) . any ( |l| ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" ) )
45+ && !stdout. lines ( ) . any ( |l| ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" ) )
46+ {
4647 panic ! ( "failed to find successful test run" ) ;
47- } ) ;
48+ } ;
4849}
You can’t perform that action at this time.
0 commit comments