diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/run.rs | 106 |
1 files changed, 7 insertions, 99 deletions
diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 74f4ed3d55e..479ac1c7b33 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -339,20 +339,14 @@ mod tests { use rt::io::{Writer, Reader}; #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_process_status() { assert_eq!(run::process_status("false", []), 1); assert_eq!(run::process_status("true", []), 0); } - #[test] - #[cfg(target_os="android")] - fn test_process_status() { - assert_eq!(run::process_status("/system/bin/sh", [~"-c",~"false"]), 1); - assert_eq!(run::process_status("/system/bin/sh", [~"-c",~"true"]), 0); - } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_process_output_output() { let run::ProcessOutput {status, output, error} @@ -366,24 +360,9 @@ mod tests { assert_eq!(error, ~[]); } } - #[test] - #[cfg(target_os="android")] - fn test_process_output_output() { - - let run::ProcessOutput {status, output, error} - = run::process_output("/system/bin/sh", [~"-c",~"echo hello"]); - let output_str = str::from_utf8(output); - - assert_eq!(status, 0); - assert_eq!(output_str.trim().to_owned(), ~"hello"); - // FIXME #7224 - if !running_on_valgrind() { - assert_eq!(error, ~[]); - } - } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_process_output_error() { let run::ProcessOutput {status, output, error} @@ -393,17 +372,6 @@ mod tests { assert_eq!(output, ~[]); assert!(!error.is_empty()); } - #[test] - #[cfg(target_os="android")] - fn test_process_output_error() { - - let run::ProcessOutput {status, output, error} - = run::process_output("/system/bin/mkdir", [~"."]); - - assert_eq!(status, 255); - assert_eq!(output, ~[]); - assert!(!error.is_empty()); - } #[test] #[ignore] // FIXME(#10016) cat never sees stdin close @@ -454,37 +422,22 @@ mod tests { } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_finish_once() { let mut prog = run::Process::new("false", [], run::ProcessOptions::new()); assert_eq!(prog.finish(), 1); } - #[test] - #[cfg(target_os="android")] - fn test_finish_once() { - let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"false"], - run::ProcessOptions::new()); - assert_eq!(prog.finish(), 1); - } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_finish_twice() { let mut prog = run::Process::new("false", [], run::ProcessOptions::new()); assert_eq!(prog.finish(), 1); assert_eq!(prog.finish(), 1); } - #[test] - #[cfg(target_os="android")] - fn test_finish_twice() { - let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"false"], - run::ProcessOptions::new()); - assert_eq!(prog.finish(), 1); - assert_eq!(prog.finish(), 1); - } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_finish_with_output_once() { let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new()); @@ -499,26 +452,9 @@ mod tests { assert_eq!(error, ~[]); } } - #[test] - #[cfg(target_os="android")] - fn test_finish_with_output_once() { - - let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"echo hello"], - run::ProcessOptions::new()); - let run::ProcessOutput {status, output, error} - = prog.finish_with_output(); - let output_str = str::from_utf8(output); - - assert_eq!(status, 0); - assert_eq!(output_str.trim().to_owned(), ~"hello"); - // FIXME #7224 - if !running_on_valgrind() { - assert_eq!(error, ~[]); - } - } #[test] - #[cfg(not(target_os="android"))] + #[cfg(not(target_os="android"))] // FIXME(#10380) fn test_finish_with_output_twice() { let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new()); @@ -544,34 +480,6 @@ mod tests { assert_eq!(error, ~[]); } } - #[test] - #[cfg(target_os="android")] - fn test_finish_with_output_twice() { - - let mut prog = run::Process::new("/system/bin/sh", [~"-c",~"echo hello"], - run::ProcessOptions::new()); - let run::ProcessOutput {status, output, error} - = prog.finish_with_output(); - - let output_str = str::from_utf8(output); - - assert_eq!(status, 0); - assert_eq!(output_str.trim().to_owned(), ~"hello"); - // FIXME #7224 - if !running_on_valgrind() { - assert_eq!(error, ~[]); - } - - let run::ProcessOutput {status, output, error} - = prog.finish_with_output(); - - assert_eq!(status, 0); - assert_eq!(output, ~[]); - // FIXME #7224 - if !running_on_valgrind() { - assert_eq!(error, ~[]); - } - } #[cfg(unix,not(target_os="android"))] fn run_pwd(dir: Option<&Path>) -> run::Process { |
