From 21036ed0ff69b4b46e37809c416cfa60c5eee6d6 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 28 Feb 2023 15:16:30 +0000 Subject: [PATCH] cmd/go: skip TestDocsUpToDate if 'go build' is not supported testGo is currently only configured if testenv.HasGoBuild returns true, which implies that a complete toolchain is present. Since setting up testGo now only uses the test binary itself, it does not actually require 'go build', but fixing that will be a bit more involved. For now, just skip the test when it isn't set up. Fixes #58775. Change-Id: I6487b47b44c87aa139ae11cfa44ce6f0f5f84bd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/472095 TryBot-Result: Gopher Robot Run-TryBot: Bryan Mills Reviewed-by: Alan Donovan Auto-Submit: Bryan Mills --- src/cmd/go/help_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/go/help_test.go b/src/cmd/go/help_test.go index 7f05cdf2cb..de3b96694c 100644 --- a/src/cmd/go/help_test.go +++ b/src/cmd/go/help_test.go @@ -17,6 +17,7 @@ import ( var fixDocs = flag.Bool("fixdocs", false, "if true, update alldocs.go") func TestDocsUpToDate(t *testing.T) { + testenv.MustHaveGoBuild(t) if !*fixDocs { t.Parallel() }