forked from rosa/hakurei
internal/pkg: correctly generate cure expects
This needs to dereference the identifier symlink. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -423,7 +423,7 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) {
|
|||||||
msg := message.New(log.New(os.Stderr, "cache: ", 0))
|
msg := message.New(log.New(os.Stderr, "cache: ", 0))
|
||||||
msg.SwapVerbose(testing.Verbose())
|
msg.SwapVerbose(testing.Verbose())
|
||||||
|
|
||||||
flags := tc.flags
|
flags := tc.flags | pkg.CSuppressInit
|
||||||
|
|
||||||
if info.CanDegrade {
|
if info.CanDegrade {
|
||||||
if _, err := landlock.GetABI(); err != nil {
|
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)
|
t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname)
|
||||||
} else if step.output == nil || checksum != makeChecksumH(step.output.hash()) {
|
} else if step.output == nil || checksum != makeChecksumH(step.output.hash()) {
|
||||||
if pathname != nil {
|
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]{}) {
|
} else if checksum != (unique.Handle[pkg.Checksum]{}) {
|
||||||
t.Fatalf("Cure: unexpected checksum %s", pkg.Encode(checksum.Value()))
|
t.Fatalf("Cure: unexpected checksum %s", pkg.Encode(checksum.Value()))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user