dashboard, cmd/coordinator: only split make & run for builders where it'll work
Change-Id: I1fdc27ea4adcc83fbd736d2bd1a34a07ca36a50c
Reviewed-on: https://go-review.googlesource.com/10423
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 2f2ea98..cadef2f 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -100,6 +100,22 @@
return "src/all.bash"
}
+// SplitMakeRun reports whether the coordinator should first compile
+// (using c.MakeScript), then snapshot, then run the tests (ideally
+// sharded) using c.RunScript.
+// Eventually this function should always return true (and then be deleted)
+// but for now we've only set up the scripts and verified that the main
+// configurations work.
+func (c *BuildConfig) SplitMakeRun() bool {
+ switch c.AllScript() {
+ case "src/all.bash", "src/all.bat", "src/all.rc":
+ // These we've verified to work.
+ return true
+ }
+ // Conservatively:
+ return false
+}
+
// AllScriptArgs returns the set of arguments that should be passed to the
// all.bash-equivalent script. Usually empty.
func (c *BuildConfig) AllScriptArgs() []string {