diff options
| author | bors <bors@rust-lang.org> | 2013-11-11 06:21:16 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-11 06:21:16 -0800 |
| commit | c47986b6751400ef30fa165d0278ec3fa212d54d (patch) | |
| tree | fb05e83e3256c1591133020a402a550a7b9147f5 /src/libstd | |
| parent | be79d7ecdc9a44d13a226a99e7066d57419ccd7c (diff) | |
| parent | 9bb1e256d7b9e1bd21b714b7139ecfa51dc6d64e (diff) | |
| download | rust-c47986b6751400ef30fa165d0278ec3fa212d54d.tar.gz rust-c47986b6751400ef30fa165d0278ec3fa212d54d.zip | |
auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brson
To enable test on android bot #9120 some tests are disabled and can be fixed further.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rt/io/net/addrinfo.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/io/signal.rs | 6 | ||||
| -rw-r--r-- | src/libstd/run.rs | 106 | ||||
| -rw-r--r-- | src/libstd/unstable/dynamic_lib.rs | 1 |
4 files changed, 12 insertions, 102 deletions
diff --git a/src/libstd/rt/io/net/addrinfo.rs b/src/libstd/rt/io/net/addrinfo.rs index 27cf9781c9c..684a6429775 100644 --- a/src/libstd/rt/io/net/addrinfo.rs +++ b/src/libstd/rt/io/net/addrinfo.rs @@ -114,6 +114,7 @@ mod test { use super::*; #[test] + #[ignore(cfg(target_os="android"))] // cannot give tcp/ip permission without help of apk fn dns_smoke_test() { let ipaddrs = get_host_addresses("localhost").unwrap(); let mut found_local = false; diff --git a/src/libstd/rt/io/signal.rs b/src/libstd/rt/io/signal.rs index 0f48f83a57e..9fe8cb3ed90 100644 --- a/src/libstd/rt/io/signal.rs +++ b/src/libstd/rt/io/signal.rs @@ -161,7 +161,7 @@ mod test { } } - #[test] #[cfg(unix)] + #[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378) fn test_io_signal_smoketest() { let mut signal = Listener::new(); signal.register(Interrupt); @@ -173,7 +173,7 @@ mod test { } } - #[test] #[cfg(unix)] + #[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378) fn test_io_signal_two_signal_one_signum() { let mut s1 = Listener::new(); let mut s2 = Listener::new(); @@ -191,7 +191,7 @@ mod test { } } - #[test] #[cfg(unix)] + #[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378) fn test_io_signal_unregister() { let mut s1 = Listener::new(); let mut s2 = Listener::new(); diff --git a/src/libstd/run.rs b/src/libstd/run.rs index fe23944397d..ec0e0f5c932 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 { diff --git a/src/libstd/unstable/dynamic_lib.rs b/src/libstd/unstable/dynamic_lib.rs index 7db59f2103f..d3c43e692a9 100644 --- a/src/libstd/unstable/dynamic_lib.rs +++ b/src/libstd/unstable/dynamic_lib.rs @@ -90,6 +90,7 @@ mod test { #[test] #[ignore(cfg(windows))] // FIXME #8818 + #[ignore(cfg(target_os="android"))] // FIXME(#10379) fn test_loading_cosine() { // The math library does not need to be loaded since it is already // statically linked in |
