Skip to content

Commit ca01712

Browse files
committed
dashboard: unmark darwin-arm64 as missing a TryBot
Issue 39782 is closed because we have darwin-arm64 builders by now. A misc-compile TryBot currently provides pre-submit test coverage for the darwin-arm64 port. So remove "darwin-arm64" known missing entry since it's obsolete. Also improve the test to report a problem when a port is marked as having a known missing TryBot, yet it's not actually missing. This should help humans not forget to keep the knownMissing map updated. Change-Id: Ic5c981a81c2e6016a56c6d872db458c98f215a0e Reviewed-on: https://go-review.googlesource.com/c/build/+/313209 Trust: Dmitri Shuralyov <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent 2ecf424 commit ca01712

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

dashboard/builders_test.go

+18-7
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,17 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
826826
}
827827
ports := strings.Fields(string(out))
828828

829-
done := map[string]bool{}
830-
done["darwin-arm64"] = true // TODO(golang.org/issue/39782): Add builder for darwin/arm64.
831-
done["windows-arm64"] = true // TODO(golang.org/issue/42604): Add builder for windows/arm64.
829+
// knownMissing tracks Go ports that that are known to be
830+
// completely missing TryBot (pre-submit) test coverage.
831+
//
832+
// All ports should have either a real TryBot or at least a misc-compile TryBot,
833+
// so this map is meant to be used to temporarily fix tests
834+
// when the work of adding a new port is actively underway.
835+
knownMissing := map[string]bool{
836+
"windows-arm64": true, // TODO(golang.org/issue/42604): Add builder for windows/arm64.
837+
}
838+
839+
var done = make(map[string]bool)
832840
check := func(goos, goarch string) {
833841
if goos == "android" || goos == "ios" {
834842
// TODO(golang.org/issue/25963): support
@@ -856,7 +864,7 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
856864
if strings.HasPrefix(conf.Name, "misc-compile-") {
857865
re, err := regexp.Compile(conf.allScriptArgs[0])
858866
if err != nil {
859-
t.Errorf("Invalid misc-compile filtering pattern for builder %q: %q",
867+
t.Errorf("invalid misc-compile filtering pattern for builder %q: %q",
860868
conf.Name, conf.allScriptArgs[0])
861869
}
862870

@@ -866,8 +874,12 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
866874
}
867875
}
868876
}
869-
if _, ok := done[goosArch]; !ok {
870-
t.Errorf("Missing trybot or misc-compile trybot: %q", goosArch)
877+
if knownMissing[goosArch] && done[goosArch] {
878+
// Make it visible when a builder is added but the old
879+
// knownMissing entry isn't removed by failing the test.
880+
t.Errorf("knownMissing[%q] is true, but a corresponding TryBot (real or misc-compile) exists", goosArch)
881+
} else if _, ok := done[goosArch]; !ok && !knownMissing[goosArch] {
882+
t.Errorf("missing real TryBot or misc-compile TryBot for %q", goosArch)
871883
}
872884
}
873885

@@ -878,7 +890,6 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
878890
}
879891
check(port[:slash], port[slash+1:])
880892
}
881-
882893
}
883894

884895
// TestExpectedMacstadiumVMCount ensures that only 20 instances of macOS virtual machines

0 commit comments

Comments
 (0)