dashboard: consider disabled TryBot as not providing test coverage
Some TryBot builders are disabled or configured with a custom
try policy that doesn't test the master branch of the main Go
repository. For example, openbsd-386-68 is configured with:
tryBot: explicitTrySet("sys"),
So it's only a TryBot for the x/sys repo, not the main one.
Modify TestTryBotsCompileAllPorts to not consider such TryBots
when determining whether a port has sufficient pre-submit test
coverage.
This will help in the next change which re-arranges target
selection between misc-compile TryBots.
For golang/go#32632.
Change-Id: If393610d11b04b75133a4f10f89cfdfff9dbaece
Reviewed-on: https://go-review.googlesource.com/c/build/+/313533
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index 7f34f31..932298c 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -853,10 +853,10 @@
return
}
for _, conf := range Builders {
- os := conf.GOOS()
- arch := conf.GOARCH()
+ if conf.GOOS() == goos && conf.GOARCH() == goarch &&
+ conf.BuildsRepoTryBot("go", "master", "master") {
- if os == goos && arch == goarch && (conf.tryOnly || conf.tryBot != nil) {
+ // There's a real TryBot for this GOOS/GOARCH pair.
done[goosArch] = true
break
}
@@ -864,11 +864,11 @@
if strings.HasPrefix(conf.Name, "misc-compile-") {
re, err := regexp.Compile(conf.allScriptArgs[0])
if err != nil {
- t.Errorf("invalid misc-compile filtering pattern for builder %q: %q",
+ t.Fatalf("invalid misc-compile filtering pattern for builder %q: %q",
conf.Name, conf.allScriptArgs[0])
}
-
- if re.MatchString(goosArch) || re.MatchString(goos) {
+ if re.MatchString(goosArch) {
+ // There's a misc-compile TryBot for this GOOS/GOARCH pair.
done[goosArch] = true
break
}