run the TZ test only on Macs
This commit is contained in:
parent
87c73741d0
commit
dad8108feb
@ -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 $@
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user