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 <rsc@golang.org>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 0f67b51..8d040b5 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -55,7 +55,9 @@
allScriptArgs []string
}
-func (c *BuildConfig) Env() []string { return append([]string(nil), c.env...) }
+func (c *BuildConfig) Env() []string {
+ return append([]string("GO_BUILDER_NAME="+c.Name), c.env...)
+}
func (c *BuildConfig) GOOS() string { return c.Name[:strings.Index(c.Name, "-")] }