Skip to content

Commit 16f8a74

Browse files
committed
fix(ci): provide tzdata to the coverage sandbox
The crane coverage build is hermetic and has no system zoneinfo database, so jiff could not resolve named time zones (e.g. Asia/Tokyo) and fell back to UTC. That shifted two timezone-dependent tests by a day and failed the build, even though they pass in the dev shell where the runner's zoneinfo is present. Set TZDIR to the nixpkgs tzdata so jiff resolves real offsets; referencing the store path also pulls it into the sandbox as a build input.
1 parent c921008 commit 16f8a74

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎nix/coverage.nix‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ in
4343
inherit cargoArtifacts;
4444
cargoExtraArgs = "--workspace";
4545
cargoLlvmCovExtraArgs = "--cobertura --output-path $out";
46+
# jiff resolves named time zones (e.g. Asia/Tokyo) from the system
47+
# zoneinfo database, which the hermetic build sandbox lacks, so it
48+
# would fall back to UTC and shift the timezone-dependent tests by a
49+
# day. Point it at the nixpkgs tzdata; referencing the store path here
50+
# also pulls it into the sandbox as a build input.
51+
TZDIR = "${pkgs.tzdata}/share/zoneinfo";
4652
# The workspace tests resolve default Claude data directories from
4753
# $HOME; the sandbox has none, so seed a writable HOME with the same
4854
# empty directory layout the CI test job creates before running tests.

0 commit comments

Comments
 (0)