internal/pkg: write per-artifact logs
Some checks failed
Test / ShareFS (push) Successful in 35s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Sandbox (push) Successful in 42s
Test / Hakurei (race detector) (push) Successful in 46s
Test / Create distribution (push) Successful in 57s
Test / Hakurei (push) Failing after 2m25s
Test / Flake checks (push) Has been skipped

This is currently only used by execArtifact. A later patch will add additional logging facilities.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-03 22:47:18 +09:00
parent ea87664a75
commit 3855fa0c30
3 changed files with 125 additions and 8 deletions

View File

@@ -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),