Skip to content

Commit 2e5c6aa

Browse files
committed
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 <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent ca01712 commit 2e5c6aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dashboard/builders_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -853,22 +853,22 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
853853
return
854854
}
855855
for _, conf := range Builders {
856-
os := conf.GOOS()
857-
arch := conf.GOARCH()
856+
if conf.GOOS() == goos && conf.GOARCH() == goarch &&
857+
conf.BuildsRepoTryBot("go", "master", "master") {
858858

859-
if os == goos && arch == goarch && (conf.tryOnly || conf.tryBot != nil) {
859+
// There's a real TryBot for this GOOS/GOARCH pair.
860860
done[goosArch] = true
861861
break
862862
}
863863

864864
if strings.HasPrefix(conf.Name, "misc-compile-") {
865865
re, err := regexp.Compile(conf.allScriptArgs[0])
866866
if err != nil {
867-
t.Errorf("invalid misc-compile filtering pattern for builder %q: %q",
867+
t.Fatalf("invalid misc-compile filtering pattern for builder %q: %q",
868868
conf.Name, conf.allScriptArgs[0])
869869
}
870-
871-
if re.MatchString(goosArch) || re.MatchString(goos) {
870+
if re.MatchString(goosArch) {
871+
// There's a misc-compile TryBot for this GOOS/GOARCH pair.
872872
done[goosArch] = true
873873
break
874874
}

0 commit comments

Comments
 (0)