Skip to content

Commit d6dec9c

Browse files
committed
dashboard, cmd/makemac: add macOS 10.15 Catalina builder
Added the macOS 10.15 Catalina builder to the dashboard. Catalina builders should use the Mojave guestid in vSphere 6.7 update 3 because the Catalina guestid is not available in this version of vSphere. A Catalina builder will run on this version of vSphere with the Mojave guestid. Modified the expected number of vm instances running on Macstadium due to the addition of macOS 10.15 builders. Updates golang/go#34748 Change-Id: If14f6e088afc05dd1783460f21907e9345e3c338 Reviewed-on: https://go-review.googlesource.com/c/build/+/207937 Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 6191a53 commit d6dec9c

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

cmd/makemac/makemac.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,13 @@ func (st *State) CreateMac(ctx context.Context, minor int) (slotName string, err
228228
case 15:
229229
// Catalina. Requires vSphere 6.7 update 3.
230230
// https://docs.macstadium.com/docs/vsphere-67-update-3
231-
guestType = "darwin19_64Guest"
231+
// vSphere 6.7 update 3 does not support the guestid `darwin19_64Guest` (which would be
232+
// associated with macOS 10.15. It enables the creation of a macOS 10.15 vm via guestid
233+
// `darwin18_64Guest`.
234+
// TODO: Add a new GOS definition for darwin19_64 (macOS 10.15) in HWV >= 17
235+
// https://github.com/vmware/open-vm-tools/commit/6297504ef9e139c68b65afe299136d041d690eeb
236+
// TODO: investigate updating the guestid when we upgrade vSphere past version 6.7u3.
237+
guestType = "darwin18_64Guest"
232238
default:
233239
return "", fmt.Errorf("unsupported makemac minor OS X version %d", minor)
234240
}

dashboard/builders.go

+18-2
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ var Hosts = map[string]*HostConfig{
481481
},
482482
"host-darwin-10_11": &HostConfig{
483483
IsReverse: true,
484-
ExpectNum: 7,
484+
ExpectNum: 3,
485485
Notes: "MacStadium OS X 10.11 VM under VMWare ESXi",
486486
env: []string{
487487
"GOROOT_BOOTSTRAP=/Users/gopher/go1.4",
@@ -501,14 +501,24 @@ var Hosts = map[string]*HostConfig{
501501
},
502502
"host-darwin-10_14": &HostConfig{
503503
IsReverse: true,
504-
ExpectNum: 7,
504+
ExpectNum: 5,
505505
Notes: "MacStadium macOS Mojave (10.14) VM under VMWare ESXi",
506506
env: []string{
507507
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
508508
},
509509
SSHUsername: "gopher",
510510
HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate
511511
},
512+
"host-darwin-10_15": &HostConfig{
513+
IsReverse: true,
514+
ExpectNum: 6,
515+
Notes: "MacStadium macOS Catalina (10.15) VM under VMWare ESXi",
516+
env: []string{
517+
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
518+
},
519+
SSHUsername: "gopher",
520+
HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate
521+
},
512522
"host-linux-s390x": &HostConfig{
513523
Notes: "run by IBM",
514524
OwnerGithub: "mundaym",
@@ -2069,6 +2079,12 @@ func init() {
20692079
shouldRunDistTest: macTestPolicy,
20702080
buildsRepo: defaultPlusExp,
20712081
})
2082+
addBuilder(BuildConfig{
2083+
Name: "darwin-amd64-10_15",
2084+
HostType: "host-darwin-10_15",
2085+
shouldRunDistTest: macTestPolicy,
2086+
buildsRepo: defaultPlusExp,
2087+
})
20722088
addBuilder(BuildConfig{
20732089
Name: "darwin-amd64-nocgo",
20742090
HostType: "host-darwin-10_14",

dashboard/builders_test.go

+18-1
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ func TestBuilderConfig(t *testing.T) {
472472
{b("windows-386-2008", "exp"), both},
473473
{b("windows-amd64-2016", "exp"), both},
474474
{b("darwin-amd64-10_14", "exp"), onlyPost},
475+
{b("darwin-amd64-10_15", "exp"), onlyPost},
475476
// ... but not on most others:
476477
{b("darwin-amd64-10_12", "exp"), none},
477478
{b("freebsd-386-11_2", "exp"), none},
@@ -494,6 +495,7 @@ func TestBuilderConfig(t *testing.T) {
494495
{b("[email protected]", "net"), none},
495496
{b("[email protected]", "net"), none},
496497

498+
{b("darwin-amd64-10_15", "go"), onlyPost},
497499
{b("darwin-amd64-10_14", "go"), onlyPost},
498500
{b("darwin-amd64-10_12", "go"), onlyPost},
499501
{b("darwin-amd64-10_11", "go"), onlyPost},
@@ -615,10 +617,10 @@ func TestShouldRunDistTest(t *testing.T) {
615617
{"darwin-amd64-10_11", "test:foo", postSubmit, false},
616618
{"darwin-amd64-10_12", "test:foo", postSubmit, false},
617619
{"darwin-amd64-10_14", "test:foo", postSubmit, false},
618-
{"darwin-amd64-10_14", "test:foo", postSubmit, false},
619620
{"darwin-amd64-10_14", "reboot", postSubmit, false},
620621
{"darwin-amd64-10_14", "api", postSubmit, false},
621622
{"darwin-amd64-10_14", "codewalk", postSubmit, false},
623+
{"darwin-amd64-10_15", "test:foo", postSubmit, false},
622624
}
623625
for _, tt := range tests {
624626
bc, ok := Builders[tt.builder]
@@ -803,3 +805,18 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
803805
}
804806

805807
}
808+
809+
// TestExpectedMacstadiumVMCount ensures that only 20 instances of macOS virtual machines
810+
// are expected at MacStadium.
811+
// TODO: remove once the scheduler allocates VMs based on demand https://golang.org/issue/35698
812+
func TestExpectedMacstadiumVMCount(t *testing.T) {
813+
got := 0
814+
for host, config := range Hosts {
815+
if strings.HasPrefix(host, "host-darwin-10_") {
816+
got += config.ExpectNum
817+
}
818+
}
819+
if got != 20 {
820+
t.Fatalf("macstadium host count: got %d; want 20", got)
821+
}
822+
}

0 commit comments

Comments
 (0)