Skip to content

Commit

Permalink
Ignore mac potatoes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Jul 25, 2024
1 parent 0acb07e commit 250fb7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,9 @@ where
|| {
let mut diagnostics = Vec::new();

// Macs, simply the worst
let secs = if std::env::var_os("CI").is_some() && cfg!(target_os = "macos") {
30
} else {
10
};
const TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30);

let timeout = std::time::Duration::from_secs(secs);
let trx = crossbeam::channel::after(timeout);
let trx = crossbeam::channel::after(TIMEOUT);
loop {
crossbeam::select! {
recv(rx) -> msg => {
Expand All @@ -314,7 +308,7 @@ where
}
}
recv(trx) -> _ => {
anyhow::bail!("Timed out after {timeout:?}");
anyhow::bail!("Timed out after {TIMEOUT:?}");
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions tests/bans_build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Ignore these tests on macos since they are only run in CI, which is actually just
// a potato masquerading as a computer
#![cfg(not(target_os = "macos"))]

use cargo_deny::{field_eq, func_name, test_utils::*};

/// Verifies we can detect and error on builtin globs
Expand Down

0 comments on commit 250fb7b

Please sign in to comment.