Skip to content

Commit

Permalink
dashboard, cmd/makemac: add macOS 10.15 Catalina builder
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cagedmantis committed Nov 21, 2019
1 parent 6191a53 commit d6dec9c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
8 changes: 7 additions & 1 deletion cmd/makemac/makemac.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ func (st *State) CreateMac(ctx context.Context, minor int) (slotName string, err
case 15:
// Catalina. Requires vSphere 6.7 update 3.
// https://docs.macstadium.com/docs/vsphere-67-update-3
guestType = "darwin19_64Guest"
// vSphere 6.7 update 3 does not support the guestid `darwin19_64Guest` (which would be
// associated with macOS 10.15. It enables the creation of a macOS 10.15 vm via guestid
// `darwin18_64Guest`.
// TODO: Add a new GOS definition for darwin19_64 (macOS 10.15) in HWV >= 17
// https://github.com/vmware/open-vm-tools/commit/6297504ef9e139c68b65afe299136d041d690eeb
// TODO: investigate updating the guestid when we upgrade vSphere past version 6.7u3.
guestType = "darwin18_64Guest"
default:
return "", fmt.Errorf("unsupported makemac minor OS X version %d", minor)
}
Expand Down
20 changes: 18 additions & 2 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ var Hosts = map[string]*HostConfig{
},
"host-darwin-10_11": &HostConfig{
IsReverse: true,
ExpectNum: 7,
ExpectNum: 3,
Notes: "MacStadium OS X 10.11 VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/go1.4",
Expand All @@ -501,14 +501,24 @@ var Hosts = map[string]*HostConfig{
},
"host-darwin-10_14": &HostConfig{
IsReverse: true,
ExpectNum: 7,
ExpectNum: 5,
Notes: "MacStadium macOS Mojave (10.14) VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
},
SSHUsername: "gopher",
HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate
},
"host-darwin-10_15": &HostConfig{
IsReverse: true,
ExpectNum: 6,
Notes: "MacStadium macOS Catalina (10.15) VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
},
SSHUsername: "gopher",
HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate
},
"host-linux-s390x": &HostConfig{
Notes: "run by IBM",
OwnerGithub: "mundaym",
Expand Down Expand Up @@ -2069,6 +2079,12 @@ func init() {
shouldRunDistTest: macTestPolicy,
buildsRepo: defaultPlusExp,
})
addBuilder(BuildConfig{
Name: "darwin-amd64-10_15",
HostType: "host-darwin-10_15",
shouldRunDistTest: macTestPolicy,
buildsRepo: defaultPlusExp,
})
addBuilder(BuildConfig{
Name: "darwin-amd64-nocgo",
HostType: "host-darwin-10_14",
Expand Down
19 changes: 18 additions & 1 deletion dashboard/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ func TestBuilderConfig(t *testing.T) {
{b("windows-386-2008", "exp"), both},
{b("windows-amd64-2016", "exp"), both},
{b("darwin-amd64-10_14", "exp"), onlyPost},
{b("darwin-amd64-10_15", "exp"), onlyPost},
// ... but not on most others:
{b("darwin-amd64-10_12", "exp"), none},
{b("freebsd-386-11_2", "exp"), none},
Expand All @@ -494,6 +495,7 @@ func TestBuilderConfig(t *testing.T) {
{b("[email protected]", "net"), none},
{b("[email protected]", "net"), none},

{b("darwin-amd64-10_15", "go"), onlyPost},
{b("darwin-amd64-10_14", "go"), onlyPost},
{b("darwin-amd64-10_12", "go"), onlyPost},
{b("darwin-amd64-10_11", "go"), onlyPost},
Expand Down Expand Up @@ -615,10 +617,10 @@ func TestShouldRunDistTest(t *testing.T) {
{"darwin-amd64-10_11", "test:foo", postSubmit, false},
{"darwin-amd64-10_12", "test:foo", postSubmit, false},
{"darwin-amd64-10_14", "test:foo", postSubmit, false},
{"darwin-amd64-10_14", "test:foo", postSubmit, false},
{"darwin-amd64-10_14", "reboot", postSubmit, false},
{"darwin-amd64-10_14", "api", postSubmit, false},
{"darwin-amd64-10_14", "codewalk", postSubmit, false},
{"darwin-amd64-10_15", "test:foo", postSubmit, false},
}
for _, tt := range tests {
bc, ok := Builders[tt.builder]
Expand Down Expand Up @@ -803,3 +805,18 @@ func TestTryBotsCompileAllPorts(t *testing.T) {
}

}

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

0 comments on commit d6dec9c

Please sign in to comment.