1
0
mirror of https://github.com/golang/go synced 2024-09-30 04:34:33 -06:00

cmd/go: fix longtest builder after runtime/internal/atomic

Loosen test to accept staleness in any runtime/internal package.
Fixes longtest builder.

Change-Id: Iffda9c1d1816f76c782aecc4d53c0ea3e6580587
Reviewed-on: https://go-review.googlesource.com/c/go/+/443755
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
This commit is contained in:
Russ Cox 2022-10-18 13:46:26 -04:00 committed by Gopher Robot
parent 4fb35d6cee
commit b6e1a563fc

View File

@ -965,7 +965,7 @@ func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) {
// now they all matter, so keep using sys.go. // now they all matter, so keep using sys.go.
restore = addVar(sys, 1) restore = addVar(sys, 1)
defer restore() defer restore()
tg.wantStale("p1", "stale dependency: runtime/internal/sys", "./testgo list claims p1 is NOT stale, incorrectly, after changing sys.go") tg.wantStale("p1", "stale dependency: runtime/internal", "./testgo list claims p1 is NOT stale, incorrectly, after changing sys.go")
restore() restore()
tg.wantNotStale("p1", "", "./testgo list claims p1 is stale, incorrectly, after changing back to old release") tg.wantNotStale("p1", "", "./testgo list claims p1 is stale, incorrectly, after changing back to old release")
addVar(sys, 2) addVar(sys, 2)
@ -975,7 +975,7 @@ func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) {
// Restore to "old" release. // Restore to "old" release.
restore() restore()
tg.wantStale("p1", "stale dependency: runtime/internal/sys", "./testgo list claims p1 is NOT stale, incorrectly, after restoring sys.go") tg.wantStale("p1", "stale dependency: runtime/internal", "./testgo list claims p1 is NOT stale, incorrectly, after restoring sys.go")
tg.run("install", "p1") tg.run("install", "p1")
tg.wantNotStale("p1", "", "./testgo list claims p1 is stale after building with old release") tg.wantNotStale("p1", "", "./testgo list claims p1 is stale after building with old release")
} }