cmd/go: drop GOEXPERIMENT in script tests
TestScript sets the GOEXPERIMENT environment variable to the value of buildcfg.GOEXPERIMENT() with the intent that tests can use this to inspect the value of buildcfg.GOEXPERIMENT. This has the unfortunate side-effect of also affecting the experiments enabled for all builds done by TestScript. For the most part this is harmless, but GOEXPERIMENT can be GOOS/GOARCH-sensitive, so if a test changes GOOS or GOARCH, it will continue to use the GOEXPERIMENT from the host GOOS/GOARCH rather than what makes sense (or is even allowed) in the test's GOOS/GOARCH. In fact, prior to CL 307819, TestScript set GOEXPSTRING instead of GOEXPERIMENT because it previously captured objabi.Expstring(), so the captured value didn't affect the build. There's only one experiment that actually uses TestScript's GOEXPERIMENT and there's a much better way to write that test now such that it doesn't need to read GOEXPERIMENT at all. Hence, this CL rewrites this test and drops GOEXPERIMENT from TestScript. This should fix the *-regabi builders. Change-Id: I3fcbf1f21e1b471ebc0e953c31333645553ea24c Reviewed-on: https://go-review.googlesource.com/c/go/+/310969 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:David Chase <drchase@google.com>
Loading
Please sign in to comment