Skip to content

Commit d8c9ef9

Browse files
committed
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 <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
1 parent fd3d279 commit d8c9ef9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmd/dist/test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ func (t *tester) run() {
133133
// to break if we don't automatically refresh things here.
134134
// Rebuilding is a shortened bootstrap.
135135
// See cmdbootstrap for a description of the overall process.
136-
if !t.listMode {
136+
//
137+
// But don't do this if we're running in the Go build system,
138+
// where cmd/dist is invoked many times. This just slows that
139+
// down (Issue 24300).
140+
if !t.listMode && os.Getenv("GO_BUILDER_NAME") == "" {
137141
goInstall("go", append([]string{"-i"}, toolchain...)...)
138142
goInstall("go", append([]string{"-i"}, toolchain...)...)
139143
goInstall("go", "std", "cmd")

0 commit comments

Comments
 (0)