Skip to content

Commit

Permalink
tests/helper: Make critical-section optional
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 21, 2024
1 parent fd29097 commit 69f4ccf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ serde = { version = "1.0.60", optional = true, default-features = false }
critical-section = { version = "1", optional = true }

[dev-dependencies]
test-helper = { path = "tests/helper", features = ["std"] }
test-helper = { path = "tests/helper", features = ["std", "critical-section"] }

build-context = "0.1"
crossbeam-utils = "=0.8.16" # The latest crossbeam-utils requires Rust 1.60
Expand Down
2 changes: 1 addition & 1 deletion tests/helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ doc = false
test = false

[features]
std = ["critical-section", "fs-err", "libc", "windows-sys"]
std = ["fs-err", "libc", "windows-sys"]

[dependencies]
critical-section = { version = "1", optional = true, features = ["restore-state-bool"] }
Expand Down
1 change: 1 addition & 0 deletions tests/helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub mod sys;
#[cfg(feature = "std")]
pub mod cpuinfo;
#[cfg(feature = "std")]
#[cfg(feature = "critical-section")]
mod critical_section_std;
#[cfg(feature = "std")]
pub mod once_lock;
Expand Down

0 comments on commit 69f4ccf

Please sign in to comment.