Test with multiple time zones.
Previously Chrono was mainly tested in UTC (Travis) and UTC+9 (the maintainer's local time zone), but we have frequently seen bugs that only appear in time zones behind UTC. This commit makes the test run all unit tests three times, in different time zones (UTC, UTC+9:30 and UTC-4 for now---the choice is mostly arbitrary but tries to cover DST and half-hour offsets for the future). Travis already ran them three times (for rust-serialize and Serde) so this won't slow the CI down. Closes #130.
This commit is contained in:
parent
73a3ec5514
commit
1afa60f377
|
@ -17,13 +17,14 @@ env:
|
|||
- LD_LIBRARY_PATH: /usr/local/lib
|
||||
script:
|
||||
# interleave building and testing in hope that it saves time
|
||||
# also vary the local time zone to (hopefully) catch tz-dependent bugs
|
||||
# also avoid doc-testing multiple times---it takes a lot and rarely helps
|
||||
- cargo build -v
|
||||
- cargo test -v
|
||||
- TZ=ACST-9:30 cargo test -v
|
||||
- cargo build -v --features rustc-serialize
|
||||
- cargo test -v --features rustc-serialize --lib
|
||||
- TZ=EST4 cargo test -v --features rustc-serialize --lib
|
||||
- cargo build -v --features 'serde bincode'
|
||||
- cargo test -v --features 'serde bincode' --lib
|
||||
- TZ=UTC0 cargo test -v --features 'serde bincode' --lib
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
|
|
4
Makefile
4
Makefile
|
@ -45,7 +45,9 @@ README.md: src/lib.rs
|
|||
|
||||
.PHONY: test
|
||||
test:
|
||||
cargo test --features 'serde rustc-serialize bincode'
|
||||
TZ=UTC0 cargo test --features 'serde rustc-serialize bincode' --lib
|
||||
TZ=ACST-9:30 cargo test --features 'serde rustc-serialize bincode' --lib
|
||||
TZ=EST4 cargo test --features 'serde rustc-serialize bincode'
|
||||
|
||||
.PHONY: doc
|
||||
doc: authors readme
|
||||
|
|
Loading…
Reference in New Issue