Skip to content

Commit

Permalink
Ignore these tests ,since the called commands doesn't exist in VxWorks
Browse files Browse the repository at this point in the history
  • Loading branch information
Umesh Kalappa authored and BaoshanPang committed Nov 6, 2019
1 parent 3f0e164 commit 9afacd7
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ mod tests {
// FIXME(#10380) these tests should not all be ignored on android.

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn smoke() {
let p = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 0"]).spawn()
Expand All @@ -1683,7 +1683,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn exit_reported_right() {
let p = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn()
Expand All @@ -1698,7 +1698,7 @@ mod tests {

#[test]
#[cfg(unix)]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn signal_reported_right() {
use crate::os::unix::process::ExitStatusExt;

Expand Down Expand Up @@ -1726,7 +1726,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn stdout_works() {
if cfg!(target_os = "windows") {
let mut cmd = Command::new("cmd");
Expand All @@ -1740,7 +1740,7 @@ mod tests {
}

#[test]
#[cfg_attr(any(windows, target_os = "android"), ignore)]
#[cfg_attr(any(windows, target_os = "android", target_os = "vxworks"), ignore)]
fn set_current_dir_works() {
let mut cmd = Command::new("/bin/sh");
cmd.arg("-c").arg("pwd")
Expand All @@ -1750,7 +1750,7 @@ mod tests {
}

#[test]
#[cfg_attr(any(windows, target_os = "android"), ignore)]
#[cfg_attr(any(windows, target_os = "android", target_os = "vxworks"), ignore)]
fn stdin_works() {
let mut p = Command::new("/bin/sh")
.arg("-c").arg("read line; echo $line")
Expand All @@ -1766,7 +1766,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn test_process_status() {
let mut status = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).status().unwrap()
Expand All @@ -1792,7 +1792,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn test_process_output_output() {
let Output {status, stdout, stderr}
= if cfg!(target_os = "windows") {
Expand All @@ -1808,7 +1808,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(target_os = "vxworks", ignore)]
fn test_process_output_error() {
let Output {status, stdout, stderr}
= if cfg!(target_os = "windows") {
Expand All @@ -1823,7 +1823,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn test_finish_once() {
let mut prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
Expand All @@ -1834,7 +1834,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn test_finish_twice() {
let mut prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
Expand All @@ -1846,7 +1846,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg_attr(any(target_os = "vxworks", target_os = "android"), ignore)]
fn test_wait_with_output_once() {
let prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "echo hello"]).stdout(Stdio::piped()).spawn().unwrap()
Expand Down Expand Up @@ -1881,6 +1881,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "vxworks", ignore)]
fn test_override_env() {
use crate::env;

Expand All @@ -1901,6 +1902,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "vxworks", 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();
Expand All @@ -1910,6 +1912,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "vxworks", ignore)]
fn test_capture_env_at_spawn() {
use crate::env;

Expand Down Expand Up @@ -1965,6 +1968,7 @@ mod tests {

// Regression tests for #30862.
#[test]
#[cfg_attr(target_os = "vxworks", ignore)]
fn test_interior_nul_in_env_key_is_error() {
match env_cmd().env("has-some-\0\0s-inside", "value").spawn() {
Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
Expand All @@ -1973,6 +1977,7 @@ mod tests {
}

#[test]
#[cfg_attr(target_os = "vxworks", ignore)]
fn test_interior_nul_in_env_value_is_error() {
match env_cmd().env("key", "has-some-\0\0s-inside").spawn() {
Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
Expand Down

0 comments on commit 9afacd7

Please sign in to comment.