From: Bryan C. Mills Date: Tue, 22 Nov 2022 05:27:07 +0000 (-0500) Subject: cmd/dist: skip the staleness check for 'cmd' when testing on aix-ppc64 X-Git-Tag: go1.20rc1~110 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5b1b080ca5433c957aaee431d3e429558742cb10;p=gostls13.git cmd/dist: skip the staleness check for 'cmd' when testing on aix-ppc64 The gcc toolchain on the aix-ppc64 builder apparently does not achieve reproducible builds for packages that use cgo, which causes the binaries in cmd that use package "net" (cmd/go, cmd/pprof, and cmd/trace) to appear stale whenever the Go build cache is cleared. For now, we work around the staleness by rebuilding std and simply not checking whether cmd is stale. For #56896. Updates #47257. Change-Id: I15f86e72dee53904b881710d5d5d613872361510 Reviewed-on: https://go-review.googlesource.com/c/go/+/452680 Run-TryBot: Bryan Mills Reviewed-by: Ayappan Perumal Auto-Submit: Bryan Mills Reviewed-by: Russ Cox TryBot-Result: Gopher Robot --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 3f16fc3e08..eadca9c08f 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -159,7 +159,7 @@ func (t *tester) run() { } if !t.listMode { - if os.Getenv("GO_BUILDER_NAME") == "" { + if builder := os.Getenv("GO_BUILDER_NAME"); builder == "" { // Complete rebuild bootstrap, even with -no-rebuild. // If everything is up-to-date, this is a no-op. // If everything is not up-to-date, the first checkNotStale @@ -185,7 +185,15 @@ func (t *tester) run() { // running dist test, so rebuild (but don't install) std and cmd to make // sure packages without install targets are cached so they are not stale. goCmd("go", "build", "std", "cmd") // make sure dependencies of targets are cached - checkNotStale("go", "std", "cmd") + if builder == "aix-ppc64" { + // The aix-ppc64 builder for some reason does not have deterministic cgo + // builds, so "cmd" is stale. Fortunately, most of the tests don't care. + // TODO(#56896): remove this special case once the builder supports + // determistic cgo builds. + checkNotStale("go", "std") + } else { + checkNotStale("go", "std", "cmd") + } } }