1
0
mirror of https://github.com/golang/go synced 2024-11-13 15:30:22 -07:00

test: only test -G=3 by default

-G=0 is in maintenance mode, so limit testing it to the longtest
builders.

Change-Id: Ie8a01866b506183d0201f2a3730377cfa663da80
Reviewed-on: https://go-review.googlesource.com/c/go/+/347298
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Matthew Dempsky 2021-09-02 12:14:47 -07:00
parent 9633195ae1
commit 58244eee01

View File

@ -85,12 +85,12 @@ var unifiedEnabled, defaultGLevels = func() (bool, string) {
// won't need to disable tests for it anymore anyway. // won't need to disable tests for it anymore anyway.
enabled := strings.Contains(","+env.GOEXPERIMENT+",", ",unified,") enabled := strings.Contains(","+env.GOEXPERIMENT+",", ",unified,")
// Normal test runs should test with both -G=0 and -G=3 for types2 // Test both -G=0 and -G=3 on the longtest builders, to make sure we
// coverage. But the unified experiment always uses types2, so // don't accidentally break -G=0 mode until we're ready to remove it
// testing with -G=3 is redundant. // completely. But elsewhere, testing -G=3 alone should be enough.
glevels := "0,3" glevels := "3"
if enabled { if strings.Contains(os.Getenv("GO_BUILDER_NAME"), "longtest") {
glevels = "0" glevels = "0,3"
} }
return enabled, glevels return enabled, glevels