dashboard/buildlet: set GOTESTONLY=std on plan9
This resulted in our first "ok" on the dashboard for Plan 9 with the
buildlet, in 19 minutes. It only runs the std tests, and nothing else
after that.
Update golang/go#9491
Change-Id: Iad77a594f83bfd3fa72596bcc3057645d9c9bb4c
Reviewed-on: https://go-review.googlesource.com/2523
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/buildlet/buildlet.go b/buildlet/buildlet.go
index 4a9047d..e96f236 100644
--- a/buildlet/buildlet.go
+++ b/buildlet/buildlet.go
@@ -66,6 +66,16 @@
if !metadata.OnGCE() && !strings.HasPrefix(*listenAddr, "localhost:") {
log.Printf("** WARNING *** This server is unsafe and offers no security. Be careful.")
}
+ if runtime.GOOS == "plan9" {
+ // Plan 9 is too slow on GCE, so stop running run.rc after the basics.
+ // See https://golang.org/cl/2522 and https://golang.org/issue/9491
+ // TODO(bradfitz): once the buildlet has environment variable support,
+ // the coordinator can send this in, and this variable can be part of
+ // the build configuration struct instead of hard-coded here.
+ // But no need for environment variables quite yet.
+ os.Setenv("GOTESTONLY", "std")
+ }
+
if *scratchDir == "" {
dir, err := ioutil.TempDir("", "buildlet-scatch")
if err != nil {