1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:10:23 -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.
enabled := strings.Contains(","+env.GOEXPERIMENT+",", ",unified,")
// Normal test runs should test with both -G=0 and -G=3 for types2
// coverage. But the unified experiment always uses types2, so
// testing with -G=3 is redundant.
glevels := "0,3"
if enabled {
glevels = "0"
// Test both -G=0 and -G=3 on the longtest builders, to make sure we
// don't accidentally break -G=0 mode until we're ready to remove it
// completely. But elsewhere, testing -G=3 alone should be enough.
glevels := "3"
if strings.Contains(os.Getenv("GO_BUILDER_NAME"), "longtest") {
glevels = "0,3"
}
return enabled, glevels