]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix TestScript/tool_build_as_needed
authorRuss Cox <rsc@golang.org>
Wed, 5 Nov 2025 19:05:45 +0000 (14:05 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 5 Nov 2025 20:30:28 +0000 (12:30 -0800)
commita8fb94969cb98efd84fa4f6fdccc14a5866828be
treee7ca92c25fea209d0397d608d2508841681c9621
parent04f05219c4f78b0f932485d2544b8c7193c04bb0
cmd/go: fix TestScript/tool_build_as_needed

This test assumes that changing GOOS/GOARCH results in an
unrunnable binary, but that's not true if the user has
go_GOOS_GOARCH_exec programs in their path (like I do).
This test was timing out waiting to create a gomote to run
a windows/amd64 binary.

Rewrite the test not to assume that alternate GOOS/GOARCH
binaries are unrunnable.

Fixes one failing case in 'go test cmd/go' on my Mac.

Change-Id: Ib5f721f91e10d285820efb5995a3a9bc29833214
Reviewed-on: https://go-review.googlesource.com/c/go/+/718180
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/cmd/go/testdata/script/tool_build_as_needed.txt