Skip to content

Commit

Permalink
Convert all test platform skips to proper ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed Oct 5, 2018
1 parent 1263ff6 commit 0b4c840
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions tests/debounce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ fn create_rename_delete_directory() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn create_rename_overwrite_directory() {
// overwriting directories doesn't work on windows
if cfg!(target_os="windows") {
Expand Down Expand Up @@ -1023,7 +1023,7 @@ fn modify_delete_directory() {
// consistent failures on macOS CI — ignored for now
// https://github.com/passcod/notify/issues/124
#[test]
#[cfg(not(target_os = "macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn move_in_directory_watch_subdirectories() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -1052,7 +1052,7 @@ fn move_in_directory_watch_subdirectories() {

// https://github.com/passcod/notify/issues/129
#[test]
#[cfg(not(target_os = "macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn rename_create_remove_temp_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand All @@ -1076,7 +1076,7 @@ fn rename_create_remove_temp_file() {
}

#[test]
#[cfg(not(target_os = "macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn rename_rename_remove_temp_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down
17 changes: 9 additions & 8 deletions tests/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn write_file() {
}

#[test]
#[cfg(not(any(target_os="windows", target_os="macos")))]
#[cfg_attr(any(target_os = "windows", target_os = "macos"), ignore)]
fn modify_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -198,7 +198,7 @@ fn rename_file() {
}

#[test]
#[cfg(not(target_os="macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn move_out_create_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -237,7 +237,7 @@ fn move_out_create_file() {
}

#[test]
#[cfg(not(any(target_os="windows", target_os="macos")))]
#[cfg_attr(any(target_os = "windows", target_os = "macos"), ignore)]
fn create_write_modify_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -389,6 +389,7 @@ fn create_directory() {

// https://github.com/passcod/notify/issues/124
#[test]
#[cfg_attr(target_os = "macos", ignore)]
fn create_directory_watch_subdirectories() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -434,7 +435,7 @@ fn create_directory_watch_subdirectories() {
}

#[test]
#[cfg(not(any(target_os="windows", target_os="macos")))]
#[cfg_attr(any(target_os = "windows", target_os = "macos"), ignore)]
fn modify_directory() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -538,7 +539,7 @@ fn rename_directory() {
}

#[test]
#[cfg(not(target_os="macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn move_out_create_directory() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -571,9 +572,9 @@ fn move_out_create_directory() {
}

// https://github.com/passcod/notify/issues/124
// fails consistently on windows -- tbd?
// fails consistently on windows, macos -- tbd?
#[test]
#[cfg_attr(target_os = "windows", ignore)]
#[cfg_attr(any(target_os = "windows", target_os = "macos"), ignore)]
fn move_in_directory_watch_subdirectories() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -615,7 +616,7 @@ fn move_in_directory_watch_subdirectories() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn create_rename_overwrite_directory() {
// overwriting directories doesn't work on windows
if cfg!(target_os="windows") {
Expand Down
12 changes: 6 additions & 6 deletions tests/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ fn watch_recursive_move() {
}

#[test]
#[cfg(not(target_os="macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn watch_recursive_move_in() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -433,7 +433,7 @@ fn watch_recursive_move_in() {
}

#[test]
#[cfg(not(target_os="macos"))]
#[cfg_attr(target_os = "macos", ignore)]
fn watch_recursive_move_out() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -851,7 +851,7 @@ fn unwatch_directory() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn unwatch_nonexisting() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -920,7 +920,7 @@ fn self_delete_file() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn self_delete_directory() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -984,7 +984,7 @@ fn self_delete_directory() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn self_rename_file() {
let tdir = TempDir::new("temp_dir").expect("failed to create temporary directory");

Expand Down Expand Up @@ -1227,7 +1227,7 @@ fn parent_rename_file() {
}

#[test]
#[cfg(not(target_os="windows"))]
#[cfg_attr(target_os = "windows", ignore)]
fn parent_rename_directory() {
// removing the parent directory doesn't work on windows
if cfg!(target_os="windows") {
Expand Down

0 comments on commit 0b4c840

Please sign in to comment.