1
0
mirror of https://github.com/golang/go synced 2024-11-26 13:08:08 -07:00

cmd/go: fix TestNewReleaseRebuildsStalePackagesInGOPATH for runtime move

CL 600436 moved runtime/internal/sys to internal/runtime/sys and updated
TestNewReleaseRebuildsStalePackagesInGOPATH in part accordingly. This is
the other part that's needed for it to pass.

For #65355.

Change-Id: I26cff96c15caf185a4ee2c8fb31ec6c877ab87e2
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/600595
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Dmitri Shuralyov 2024-07-23 18:03:24 -04:00 committed by Gopher Robot
parent c18ff29295
commit 0d5fc4e1f0

View File

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