From d8c9ef9e5cb6d485d9e15a48884ffb1162c48fb3 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 7 Mar 2018 22:14:55 +0000 Subject: [PATCH] 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 --- src/cmd/dist/test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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") -- 2.50.0