]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: skip rebuild before running tests when on the build systems
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 7 Mar 2018 22:14:55 +0000 (22:14 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 7 Mar 2018 23:27:24 +0000 (23:27 +0000)
Updates #24300

Change-Id: I7752dab67e15a6dfe5fffe5b5ccbf3373bbc2c13
Reviewed-on: https://go-review.googlesource.com/99296
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/dist/test.go

index bc1f7339a20218c1630d37fd85d68986ff75574c..fe9dcc216ee571909f7dc7cdf6ff3ee8dcd3ca23 100644 (file)
@@ -133,7 +133,11 @@ func (t *tester) run() {
        // to break if we don't automatically refresh things here.
        // Rebuilding is a shortened bootstrap.
        // See cmdbootstrap for a description of the overall process.
-       if !t.listMode {
+       //
+       // But don't do this if we're running in the Go build system,
+       // where cmd/dist is invoked many times. This just slows that
+       // down (Issue 24300).
+       if !t.listMode && os.Getenv("GO_BUILDER_NAME") == "" {
                goInstall("go", append([]string{"-i"}, toolchain...)...)
                goInstall("go", append([]string{"-i"}, toolchain...)...)
                goInstall("go", "std", "cmd")