Update Mac dimensions for upgraded bots.

Bug: chromium:756463
No-Try: true
Change-Id: Ica864811e59162d6cfa1e89aec9c0ce8090d27df
Reviewed-on: https://skia-review.googlesource.com/36040
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index c1c8698..a609541 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -170,7 +170,7 @@
 			"Chromecast": "Android",
 			"ChromeOS":   "ChromeOS",
 			"Debian9":    DEFAULT_OS_DEBIAN,
-			"Mac":        "Mac-10.11",
+			"Mac":        "Mac-10.12",
 			"Ubuntu14":   DEFAULT_OS_UBUNTU,
 			"Ubuntu16":   "Ubuntu-16.10",
 			"Ubuntu17":   "Ubuntu-17.04",
@@ -188,6 +188,10 @@
 		if parts["model"] == "Golo" && os == "Win10" && parts["cpu_or_gpu_value"] == "GT610" {
 			d["os"] = "Windows-10-10586"
 		}
+		// This machine hasn't been upgraded yet.
+		if parts["model"] == "MacMini6.2" && os == "Mac" && parts["cpu_or_gpu"] == "CPU" {
+			d["os"] = "Mac-10.11"
+		}
 	} else {
 		d["os"] = DEFAULT_OS_DEBIAN
 	}
@@ -478,18 +482,7 @@
 		}
 	}
 
-	// TODO(stephana): Remove this once all Mac machines are on the same
-	// OS version again. Move the call to swarmDimensions back to the
-	// creation of the TaskSpec struct below.
 	dimensions := swarmDimensions(parts)
-	if strings.Contains(name, "Mac") {
-		for idx, dim := range dimensions {
-			if strings.HasPrefix(dim, "os") {
-				dimensions[idx] = "os:Mac-10.12"
-				break
-			}
-		}
-	}
 
 	// Add the task.
 	b.MustAddTask(name, &specs.TaskSpec{
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 0af07d7..39193d7 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -7826,7 +7826,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,
@@ -7873,7 +7873,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,
@@ -7920,7 +7920,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,
@@ -15216,7 +15216,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,
@@ -15263,7 +15263,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,
@@ -15310,7 +15310,7 @@
       ],
       "dimensions": [
         "gpu:8086:0a2e",
-        "os:Mac-10.11",
+        "os:Mac-10.12",
         "pool:Skia"
       ],
       "execution_timeout_ns": 14400000000000,