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>
"goversion=" + version,
"CMDGO_TEST_RUN_MAIN=true",
"HGRCPATH=",
+ "GOTOOLCHAIN=auto",
"newline=\n",
}
env TESTGO_VERSION=go1.500
env TESTGO_VERSION_SWITCH=switch
-# Default setting should be auto
-env GOTOOLCHAIN=
-go env GOTOOLCHAIN
-stdout auto
-go env
-stdout GOTOOLCHAIN=.?auto.? # maybe quoted
-
# GOTOOLCHAIN=auto runs default toolchain without a go.mod or go.work
+env GOTOOLCHAIN=auto
go version
stdout go1.500