diff --git a/rslib/Makefile b/rslib/Makefile index cc214b075..d153d537d 100644 --- a/rslib/Makefile +++ b/rslib/Makefile @@ -33,10 +33,8 @@ RUST_TOOLCHAIN := $(shell cat rust-toolchain) rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN) @touch $@ -# set TZ here for the benefit of a single unit test that fails -# when running in the GitHub workflow. .build/check: .build/rs-tools $(ALL_SOURCE) - TZ="Australia/Perth" cargo test --lib -- --nocapture + cargo test --lib -- --nocapture cargo fmt -- --check cargo clippy -- -D warnings @touch $@ diff --git a/rslib/src/sched.rs b/rslib/src/sched.rs index e320e57da..0caf053c5 100644 --- a/rslib/src/sched.rs +++ b/rslib/src/sched.rs @@ -122,6 +122,9 @@ mod test { } #[test] + #[cfg(target_vendor = "apple")] + /// On Linux, TZ needs to be set prior to the process being started to take effect, + /// so we limit this test to Macs. fn test_local_minutes_west() { // -480 throughout the year std::env::set_var("TZ", "Australia/Perth");