Skip to content

Commit 58244ee

Browse files
committed
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 <[email protected]> Run-TryBot: Matthew Dempsky <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 9633195 commit 58244ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/run.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ var unifiedEnabled, defaultGLevels = func() (bool, string) {
8585
// won't need to disable tests for it anymore anyway.
8686
enabled := strings.Contains(","+env.GOEXPERIMENT+",", ",unified,")
8787

88-
// Normal test runs should test with both -G=0 and -G=3 for types2
89-
// coverage. But the unified experiment always uses types2, so
90-
// testing with -G=3 is redundant.
91-
glevels := "0,3"
92-
if enabled {
93-
glevels = "0"
88+
// Test both -G=0 and -G=3 on the longtest builders, to make sure we
89+
// don't accidentally break -G=0 mode until we're ready to remove it
90+
// completely. But elsewhere, testing -G=3 alone should be enough.
91+
glevels := "3"
92+
if strings.Contains(os.Getenv("GO_BUILDER_NAME"), "longtest") {
93+
glevels = "0,3"
9494
}
9595

9696
return enabled, glevels

0 commit comments

Comments
 (0)