Skip to content

Commit cae837b

Browse files
committed
cmd/coordinator: set GO_BUILDER_NAME env var when exec'ing on buildlet
This will allow tests to identify that they are running on the continuous build infrastructure and run extra and/or different tests. Fixes golang/go#11346 Change-Id: Iafe25babc764b7e012c05f0b62331b11690bf194 Reviewed-on: https://go-review.googlesource.com/13120 Reviewed-by: Russ Cox <[email protected]>
1 parent 7812680 commit cae837b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dashboard/builders.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ type BuildConfig struct {
5555
allScriptArgs []string
5656
}
5757

58-
func (c *BuildConfig) Env() []string { return append([]string(nil), c.env...) }
58+
func (c *BuildConfig) Env() []string {
59+
return append([]string("GO_BUILDER_NAME="+c.Name), c.env...)
60+
}
5961

6062
func (c *BuildConfig) GOOS() string { return c.Name[:strings.Index(c.Name, "-")] }
6163

0 commit comments

Comments
 (0)