From 94e3debc632b6f3f309218395339ca0e9ba754b7 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 3 Mar 2026 22:47:18 +0900 Subject: internal/pkg: write per-artifact logs This is currently only used by execArtifact. A later patch will add additional logging facilities. Signed-off-by: Ophestra --- internal/pkg/pkg_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/pkg/pkg_test.go') diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index 700aa962..f8a72564 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -314,6 +314,11 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) { t.Fatal(err) } + // destroy non-deterministic status files + if err := os.RemoveAll(base.Append("status").String()); err != nil { + t.Fatal(err) + } + var checksum pkg.Checksum if err := pkg.HashDir(&checksum, base); err != nil { t.Fatalf("HashDir: error = %v", err) @@ -382,6 +387,9 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) { } else if step.pathname != ignorePathname && !pathname.Is(step.pathname) { t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname) } else if checksum != makeChecksumH(step.checksum) { + if checksum == (unique.Handle[pkg.Checksum]{}) { + checksum = unique.Make(pkg.Checksum{}) + } t.Fatalf( "Cure: checksum = %s, want %s", pkg.Encode(checksum.Value()), pkg.Encode(step.checksum), -- cgit v1.3.1