Skip to content

Commit

Permalink
Disable cli tests on macos without breaking other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
za-creature committed Feb 2, 2025
1 parent 32448a5 commit 1dbb132
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cli/tests/cli.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
mod utils {
mod utils;

use self::utils::{check_eq, eventually, Bin, CountWrite, RngRead};
use anyhow::{format_err, Result};
Expand All @@ -13,6 +12,7 @@ use std::{
};

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn transfer_single_small_file() {
let (a, b) = setup();

Expand All @@ -28,6 +28,7 @@ fn transfer_single_small_file() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn transfer_single_large_file() {
let (a, b) = setup();

Expand All @@ -52,6 +53,7 @@ fn transfer_single_large_file() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn sequential_write_to_the_same_file() {
let (a, b) = setup();

Expand Down Expand Up @@ -79,6 +81,7 @@ fn sequential_write_to_the_same_file() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn fast_sequential_writes() {
// There used to be a deadlock which would manifest whenever one of the connected replicas
// perfomed more than one write operation (mkdir, echo foo > bar,...) quickly one after another
Expand All @@ -98,11 +101,13 @@ fn fast_sequential_writes() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn concurrent_read_and_write_small_file() {
concurrent_read_and_write_file(32);
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn concurrent_read_and_write_large_file() {
concurrent_read_and_write_file(1024 * 1024);
}
Expand Down Expand Up @@ -141,6 +146,7 @@ fn concurrent_read_and_write_file(size: usize) {
// large enough so that the number of blocks it consists of is greater than the capacity of the
// notification channel.
#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn concurrent_read_and_delete_file() {
let (a, b) = setup();

Expand Down Expand Up @@ -183,6 +189,7 @@ fn concurrent_read_and_delete_file() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn relay() {
// Create three nodes: A, B and R where A and B are connected only to R but not to each other.
// Then create a file by A and let it be received by B which requires the file to pass through
Expand Down Expand Up @@ -227,6 +234,7 @@ fn relay() {
}

#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn concurrent_update() {
let (a, b) = setup();

Expand Down Expand Up @@ -344,6 +352,7 @@ fn check_concurrent_versions(file_path: &Path, expected_contents: &[&[u8]]) -> R
// This test is similar to the `relay` test but using a "cache server" for the relay node instead
// of a regular peer.
#[test]
#[cfg_attr(not(any(target_os = "macos", target_os = "ios")), ignore)]
fn mirror() {
// the cache server
let r = Bin::start();
Expand Down Expand Up @@ -400,5 +409,3 @@ fn setup() -> (Bin, Bin) {

(a, b)
}

}

0 comments on commit 1dbb132

Please sign in to comment.