aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/script_test.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2023-06-09 10:30:40 +0200
committerGopher Robot <gobot@golang.org>2023-06-09 12:40:01 +0000
commit1f11ea6c41e6ef323e9201649ad4863808342669 (patch)
tree7eba802a4113cd8b60c257c7e6b207c50c9a2a4a /src/cmd/go/script_test.go
parent39effbc105f5c54117a6011af3c48e3c8f14eca9 (diff)
downloadgo-1f11ea6c41e6ef323e9201649ad4863808342669.tar.gz
go-1f11ea6c41e6ef323e9201649ad4863808342669.zip
cmd/go: fix TestScript/gotoolchain* when go.env doesn't set GOTOOLCHAIN=auto
Some of the TestScript/gotoolchain* tests assume that go.env contains GOTOOLCHAIN=auto, but that's not always the case, for example CI environments may set it to `local` to avoid downloading a new toolchain. This commit fixes the tests to work regardless of the value of GOTOOLCHAIN in go.env. Fixes #60685 Change-Id: Ieda22574f8a028893762274cf9db721c9d69bf7e Reviewed-on: https://go-review.googlesource.com/c/go/+/502035 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Eli Bendersky <eliben@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r--src/cmd/go/script_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go
index a2c1087bd8..d0099888d9 100644
--- a/src/cmd/go/script_test.go
+++ b/src/cmd/go/script_test.go
@@ -246,6 +246,7 @@ func scriptEnv(srv *vcstest.Server, srvCertFile string) ([]string, error) {
"goversion=" + version,
"CMDGO_TEST_RUN_MAIN=true",
"HGRCPATH=",
+ "GOTOOLCHAIN=auto",
"newline=\n",
}