File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 88831383b4d6f95b74fc588bf8932b6108184280
2
+ refs/heads/master: c45870b85e9183a31ab0a0a8a3841977f5f2615f
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5
5
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
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)
You can’t perform that action at this time.
0 commit comments