From 4911e4af7dc78826539b61de7e32ba71a41a4f02 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Wed, 4 May 2022 15:37:49 -0400 Subject: [PATCH] internal/testenv: remove darwin/arm case from NeedsGoBuild This function was derived from internal/testenv.HasGoBuild in the standard library, which has since been updated (in https://go-review.googlesource.com/c/go/+/260719) to permit darwin/arm64 builds. Change-Id: Ifc793b52b65ee3eedb2f41fbcbfbe36a20cfdbcc Reviewed-on: https://go-review.googlesource.com/c/tools/+/403795 Reviewed-by: Robert Findley --- internal/testenv/testenv.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/testenv/testenv.go b/internal/testenv/testenv.go index d3f4776d8c..1d0cc3c08b 100644 --- a/internal/testenv/testenv.go +++ b/internal/testenv/testenv.go @@ -224,22 +224,21 @@ func NeedsGoPackagesEnv(t Testing, env []string) { // NeedsGoBuild skips t if the current system can't build programs with “go build” // and then run them with os.StartProcess or exec.Command. -// android, and darwin/arm systems don't have the userspace go build needs to run, +// Android doesn't have the userspace go build needs to run, // and js/wasm doesn't support running subprocesses. func NeedsGoBuild(t Testing) { if t, ok := t.(helperer); ok { t.Helper() } + // This logic was derived from internal/testing.HasGoBuild and + // may need to be updated as that function evolves. + NeedsTool(t, "go") switch runtime.GOOS { case "android", "js": t.Skipf("skipping test: %v can't build and run Go binaries", runtime.GOOS) - case "darwin": - if strings.HasPrefix(runtime.GOARCH, "arm") { - t.Skipf("skipping test: darwin/arm can't build and run Go binaries") - } } }