]> Cypherpunks repositories - gostls13.git/commitdiff
test: only test -G=3 by default
authorMatthew Dempsky <mdempsky@google.com>
Thu, 2 Sep 2021 19:14:47 +0000 (12:14 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 2 Sep 2021 19:33:52 +0000 (19:33 +0000)
-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>

test/run.go

index ddce94d7cc25482e546bd7af126ce58eb70f08a3..76621d924283dbdcba052edf691fd8727e21187c 100644 (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