Skip to content

Commit

Permalink
dashboard: consider disabled TryBot as not providing test coverage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dmitshur committed Apr 26, 2021
1 parent ca01712 commit 2e5c6aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dashboard/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,22 +853,22 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
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
}

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
}
Expand Down

0 comments on commit 2e5c6aa

Please sign in to comment.