diff options
| author | Brian Anderson <banderson@mozilla.com> | 2016-09-14 17:10:43 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-09-30 14:02:52 -0700 |
| commit | 183b2ddce4771df3bcfe36eb229a1791fe4b0f8f (patch) | |
| tree | eb9c8b8990972cbc42a4ca74399cbbad81415f23 /src/libstd/process.rs | |
| parent | 37abec06e502b147b9ebc730030efe10bf235765 (diff) | |
| download | rust-183b2ddce4771df3bcfe36eb229a1791fe4b0f8f.tar.gz rust-183b2ddce4771df3bcfe36eb229a1791fe4b0f8f.zip | |
Ignore entire test modules on emscripten instead of individual tests
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 233a4d3639c..94348155779 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -807,7 +807,7 @@ pub fn exit(code: i32) -> ! { ::sys::os::exit(code) } -#[cfg(test)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use io::prelude::*; @@ -819,7 +819,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn smoke() { let p = Command::new("true").spawn(); assert!(p.is_ok()); @@ -838,7 +837,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn exit_reported_right() { let p = Command::new("false").spawn(); assert!(p.is_ok()); @@ -850,7 +848,6 @@ mod tests { #[test] #[cfg(unix)] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn signal_reported_right() { use os::unix::process::ExitStatusExt; @@ -879,7 +876,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn stdout_works() { let mut cmd = Command::new("echo"); cmd.arg("foobar").stdout(Stdio::piped()); @@ -888,7 +884,6 @@ mod tests { #[test] #[cfg_attr(any(windows, target_os = "android"), ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn set_current_dir_works() { let mut cmd = Command::new("/bin/sh"); cmd.arg("-c").arg("pwd") @@ -899,7 +894,6 @@ mod tests { #[test] #[cfg_attr(any(windows, target_os = "android"), ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn stdin_works() { let mut p = Command::new("/bin/sh") .arg("-c").arg("read line; echo $line") @@ -918,7 +912,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] #[cfg(unix)] - #[cfg_attr(target_os = "emscripten", ignore)] fn uid_works() { use os::unix::prelude::*; use libc; @@ -945,7 +938,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_process_status() { let mut status = Command::new("false").status().unwrap(); assert!(status.code() == Some(1)); @@ -955,7 +947,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_process_output_fail_to_start() { match Command::new("/no-binary-by-this-name-should-exist").output() { Err(e) => assert_eq!(e.kind(), ErrorKind::NotFound), @@ -965,7 +956,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_process_output_output() { let Output {status, stdout, stderr} = Command::new("echo").arg("hello").output().unwrap(); @@ -978,7 +968,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_process_output_error() { let Output {status, stdout, stderr} = Command::new("mkdir").arg(".").output().unwrap(); @@ -990,7 +979,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_finish_once() { let mut prog = Command::new("false").spawn().unwrap(); assert!(prog.wait().unwrap().code() == Some(1)); @@ -998,7 +986,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_finish_twice() { let mut prog = Command::new("false").spawn().unwrap(); assert!(prog.wait().unwrap().code() == Some(1)); @@ -1007,7 +994,6 @@ mod tests { #[test] #[cfg_attr(target_os = "android", ignore)] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_wait_with_output_once() { let prog = Command::new("echo").arg("hello").stdout(Stdio::piped()) .spawn().unwrap(); @@ -1038,7 +1024,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_inherit_env() { use env; @@ -1064,7 +1049,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_override_env() { use env; @@ -1085,7 +1069,6 @@ mod tests { } #[test] - #[cfg_attr(target_os = "emscripten", ignore)] fn test_add_to_env() { let result = env_cmd().env("RUN_TEST_NEW_ENV", "123").output().unwrap(); let output = String::from_utf8_lossy(&result.stdout).to_string(); |
