]> git.lizzy.rs Git - rust.git/commitdiff
fix #10450
authorYoung-il Choi <duddlf.choi@samsung.com>
Thu, 14 Nov 2013 23:34:54 +0000 (08:34 +0900)
committerYoung-il Choi <duddlf.choi@samsung.com>
Tue, 19 Nov 2013 00:08:47 +0000 (09:08 +0900)
src/test/run-pass/core-run-destroy.rs

index 4a224fd52c9d99ff9fdd3153b58897bc52810906..a24d11a89b0566805b5ba90007599a9bcdd7267f 100644 (file)
 
 #[test]
 fn test_destroy_once() {
-    let mut p = run::Process::new("echo", [], run::ProcessOptions::new());
+    #[cfg(not(target_os="android"))]
+    static PROG: &'static str = "echo";
+    #[cfg(target_os="android")]
+    static PROG: &'static str = "ls"; // android don't have echo binary
+
+    let mut p = run::Process::new(PROG, [], run::ProcessOptions::new());
     p.destroy(); // this shouldn't crash (and nor should the destructor)
 }
 
 #[test]
 fn test_destroy_twice() {
-    let mut p = run::Process::new("echo", [], run::ProcessOptions::new());
+    #[cfg(not(target_os="android"))]
+    static PROG: &'static str = "echo";
+    #[cfg(target_os="android")]
+    static PROG: &'static str = "ls"; // android don't have echo binary
+
+    let mut p = run::Process::new(PROG, [], run::ProcessOptions::new());
     p.destroy(); // this shouldnt crash...
     do io::io_error::cond.trap(|_| {}).inside {
         p.destroy(); // ...and nor should this (and nor should the destructor)