dashboard, cmd/coordinator: various fixes
* add support for longtest builders for subrepos.
* fix race builders for subrepos (they weren't passing the -race flag).
* adjust the policy for the js-wasm builders to build fewer subrepos
where it'll never work or isn't worth it.
* fix the android emu builders which disappeared because an empty
string was being passed to buildsRepoAtAll. In some places in the
code an empty string for goBranch for the "go" repo meant the same
as branch, but I forgot that in the new code, so an old caller was
confusing the new config hooks. Rather than make all policy funcs be
aware of both ways, the new code in this CL now maps an empty string
to the same as the repo's branch when the repo == "go". Adds a test
too.
* fix some outdated comments.
Change-Id: Icf3fb85e5542a4d314443b59d02517b306ef46b7
Reviewed-on: https://go-review.googlesource.com/c/build/+/166897
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index 9b43db6..b305f5d 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -147,6 +147,7 @@
"freebsd-amd64-12_0",
"linux-386",
"linux-amd64",
+ "linux-amd64-race",
"netbsd-amd64-8_0",
"openbsd-386-64",
"openbsd-amd64-64",
@@ -345,10 +346,39 @@
{b("nacl-amd64p32", "go"), both},
{b("nacl-amd64p32", "net"), none},
- // Only test tip for js/wasm:
+ // Only test tip for js/wasm, and only for some repos:
{b("js-wasm", "go"), both},
+ {b("js-wasm", "arch"), onlyPost},
+ {b("js-wasm", "crypto"), onlyPost},
+ {b("js-wasm", "sys"), onlyPost},
{b("js-wasm", "net"), onlyPost},
{b("js-wasm@go1.12", "net"), none},
+ {b("js-wasm", "benchmarks"), none},
+ {b("js-wasm", "debug"), none},
+ {b("js-wasm", "mobile"), none},
+ {b("js-wasm", "perf"), none},
+ {b("js-wasm", "talks"), none},
+ {b("js-wasm", "tools"), none},
+ {b("js-wasm", "tour"), none},
+ {b("js-wasm", "website"), none},
+
+ // Race builders. Linux for all, GCE buidlers for
+ // post-submit, and only post-submit for "go" for
+ // Darwin (limited resources).
+ {b("linux-amd64-race", "go"), both},
+ {b("linux-amd64-race", "net"), both},
+ {b("windows-amd64-race", "go"), onlyPost},
+ {b("windows-amd64-race", "net"), onlyPost},
+ {b("freebsd-amd64-race", "go"), onlyPost},
+ {b("freebsd-amd64-race", "net"), onlyPost},
+ {b("darwin-amd64-race", "go"), onlyPost},
+ {b("darwin-amd64-race", "net"), none},
+
+ // Long test.
+ {b("linux-amd64-longtest", "go"), onlyPost},
+ {b("linux-amd64-longtest", "net"), onlyPost},
+ {b("linux-amd64-longtest@go1.12", "go"), onlyPost},
+ {b("linux-amd64-longtest@go1.12", "net"), none},
}
for _, tt := range tests {
t.Run(tt.br.testName, func(t *testing.T) {
@@ -393,3 +423,12 @@
}
}
}
+
+// tests that goBranch is optional for repo == "go"
+func TestBuildsRepoAtAllImplicitGoBranch(t *testing.T) {
+ builder := Builders["android-amd64-emu"]
+ got := builder.buildsRepoAtAll("go", "master", "")
+ if !got {
+ t.Error("got = false; want true")
+ }
+}