File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
branches/dist-snap/src/test/run-pass Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 88831383b4d6f95b74fc588bf8932b6108184280
9
+ refs/heads/dist-snap: c45870b85e9183a31ab0a0a8a3841977f5f2615f
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
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