From: Brad Fitzpatrick Date: Wed, 7 Mar 2018 22:14:55 +0000 (+0000) Subject: cmd/dist: skip rebuild before running tests when on the build systems X-Git-Tag: go1.11beta1~1300 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d8c9ef9e5cb6d485d9e15a48884ffb1162c48fb3;p=gostls13.git cmd/dist: skip rebuild before running tests when on the build systems Updates #24300 Change-Id: I7752dab67e15a6dfe5fffe5b5ccbf3373bbc2c13 Reviewed-on: https://go-review.googlesource.com/99296 Reviewed-by: Ian Lance Taylor Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index bc1f7339a2..fe9dcc216e 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -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")