From f7771a4480a1ec7dda0bb435c3c7533da4dc7441 Mon Sep 17 00:00:00 2001 From: Matt Green Date: Tue, 25 Oct 2016 07:19:41 -0400 Subject: [PATCH] Mark process tests as Unix-only for now --- src/runner.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runner.rs b/src/runner.rs index 8c485b6..d6c801d 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -217,6 +217,7 @@ mod process_tests { } #[test] + #[cfg(target_family = "unix")] fn test_start() { let process = Process::new("echo hi", vec![]); @@ -224,21 +225,23 @@ mod process_tests { } #[test] + #[cfg(target_family = "unix")] fn test_wait() { let file = Temp::new_file().unwrap(); let path = file.to_path_buf(); - let mut process = Process::new(&format!("echo hi > {:?}", path), vec![]).unwrap(); + let mut process = Process::new(&format!("echo hi > {}", path.to_str().unwrap()), vec![]).unwrap(); process.wait(); assert!(file_contents(&path).starts_with("hi")); } #[test] + #[cfg(target_family = "unix")] fn test_kill() { let file = Temp::new_file().unwrap(); let path = file.to_path_buf(); - let mut process = Process::new(&format!("sleep 20; echo hi > {:?}", path), vec![]).unwrap(); + let mut process = Process::new(&format!("sleep 20; echo hi > {}", path.to_str().unwrap()), vec![]).unwrap(); thread::sleep(Duration::from_millis(250)); process.kill(); process.wait();