mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
run the TZ test only on Macs
This commit is contained in:
parent
87c73741d0
commit
dad8108feb
2 changed files with 4 additions and 3 deletions
|
@ -33,10 +33,8 @@ RUST_TOOLCHAIN := $(shell cat rust-toolchain)
|
||||||
rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
|
rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
|
||||||
@touch $@
|
@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)
|
.build/check: .build/rs-tools $(ALL_SOURCE)
|
||||||
TZ="Australia/Perth" cargo test --lib -- --nocapture
|
cargo test --lib -- --nocapture
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
|
@ -122,6 +122,9 @@ mod test {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[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() {
|
fn test_local_minutes_west() {
|
||||||
// -480 throughout the year
|
// -480 throughout the year
|
||||||
std::env::set_var("TZ", "Australia/Perth");
|
std::env::set_var("TZ", "Australia/Perth");
|
||||||
|
|
Loading…
Reference in a new issue