File tree 4 files changed +20
-7
lines changed
4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 5
5
# Sometimes android shell produce exitcode "1 : Text File Busy"
6
6
# Retry after $WAIT seconds, expecting resource cleaned-up
7
7
WAIT=10
8
- PATH=$1
9
- if [ -d " $PATH " ]
8
+ TEST_PATH=$1
9
+ BIN_PATH=/system/bin
10
+ if [ -d " $TEST_PATH " ]
10
11
then
11
12
shift
12
13
RUN=$1
17
18
18
19
L_RET=1
19
20
L_COUNT=0
20
- cd $PATH
21
+ cd $TEST_PATH
21
22
while [ $L_RET -eq 1 ]
22
23
do
23
- TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$PATH $PATH /$RUN $@ 1> $PATH /$RUN .stdout 2> $PATH /$RUN .stderr
24
+ TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH= $BIN_PATH : $TEST_PATH $TEST_PATH /$RUN $@ 1> $TEST_PATH /$RUN .stdout 2> $TEST_PATH /$RUN .stderr
24
25
L_RET=$?
25
26
if [ $L_COUNT -gt 0 ]
26
27
then
30
31
L_COUNT=$(( L_COUNT+ 1 ))
31
32
done
32
33
33
- echo $L_RET > $PATH /$RUN .exitcode
34
+ echo $L_RET > $TEST_PATH /$RUN .exitcode
34
35
35
36
fi
36
37
fi
Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ impl<'self, T:Send +
477
477
478
478
479
479
#[ test]
480
+ #[ cfg( not( target_os="android") ) ] // FIXME(#10455)
480
481
fn test ( ) {
481
482
use std:: { os, run} ;
482
483
use std:: io:: fs;
Original file line number Diff line number Diff line change @@ -22,13 +22,23 @@ use std::io;
22
22
23
23
#[ test]
24
24
fn test_destroy_once ( ) {
25
- let mut p = run:: Process :: new ( "echo" , [ ] , run:: ProcessOptions :: new ( ) ) ;
25
+ #[ cfg( not( target_os="android" ) ) ]
26
+ static PROG : & ' static str = "echo" ;
27
+ #[ cfg( target_os="android" ) ]
28
+ static PROG : & ' static str = "ls" ; // android don't have echo binary
29
+
30
+ let mut p = run:: Process :: new ( PROG , [ ] , run:: ProcessOptions :: new ( ) ) ;
26
31
p. destroy ( ) ; // this shouldn't crash (and nor should the destructor)
27
32
}
28
33
29
34
#[ test]
30
35
fn test_destroy_twice ( ) {
31
- let mut p = run:: Process :: new ( "echo" , [ ] , run:: ProcessOptions :: new ( ) ) ;
36
+ #[ cfg( not( target_os="android" ) ) ]
37
+ static PROG : & ' static str = "echo" ;
38
+ #[ cfg( target_os="android" ) ]
39
+ static PROG : & ' static str = "ls" ; // android don't have echo binary
40
+
41
+ let mut p = run:: Process :: new ( PROG , [ ] , run:: ProcessOptions :: new ( ) ) ;
32
42
p. destroy ( ) ; // this shouldnt crash...
33
43
do io:: io_error:: cond. trap ( |_| { } ) . inside {
34
44
p. destroy ( ) ; // ...and nor should this (and nor should the destructor)
Original file line number Diff line number Diff line change @@ -33,4 +33,5 @@ pub fn main() {
33
33
#[ cfg( target_os = "macos" ) ]
34
34
#[ cfg( target_os = "linux" ) ]
35
35
#[ cfg( target_os = "freebsd" ) ]
36
+ #[ cfg( target_os = "android" ) ]
36
37
pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments