diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-07 15:57:45 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-07 15:57:45 +0900 |
| commit | 8a3c3d145a560b91da1d9bce9070c20289b63502 (patch) | |
| tree | a6fc1a55e8b858e2e5ac481f44184ed6b44da025 | |
| parent | 575ef307ad5cedb13a514cd038a4880ab8c91242 (diff) | |
internal/pkg: correctly generate cure expects
This needs to dereference the identifier symlink.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/pkg/pkg_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index 793b1e82..04bd665f 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -423,7 +423,7 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) { msg := message.New(log.New(os.Stderr, "cache: ", 0)) msg.SwapVerbose(testing.Verbose()) - flags := tc.flags + flags := tc.flags | pkg.CSuppressInit if info.CanDegrade { if _, err := landlock.GetABI(); err != nil { @@ -544,7 +544,11 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) { t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname) } else if step.output == nil || checksum != makeChecksumH(step.output.hash()) { if pathname != nil { - t.Fatal(expectsFrom(pathname.String())) + if name, _err := filepath.EvalSymlinks(pathname.String()); _err != nil { + t.Fatal(_err) + } else { + t.Fatal(expectsFrom(name)) + } } else if checksum != (unique.Handle[pkg.Checksum]{}) { t.Fatalf("Cure: unexpected checksum %s", pkg.Encode(checksum.Value())) } |
