cmd/dist: skip API check on plan9 builders

The plan9-arm builder has a very slow filesystem and frequently times
out on this test. The api check verifies the API for all supported
GOOS/GOARCH/CGO_ENABLED combination anyway, so if we skip it on one
builder (or even most builders) there should be no loss of coverage.

Updates #37951

Change-Id: I86a93df2ec60a6af6d942e3954eef09ce67bb39e
Reviewed-on: https://go-review.googlesource.com/c/go/+/225662
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 5baab69..0ab5e6e 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -741,7 +741,12 @@
 			})
 		}
 	}
-	if goos != "android" && !t.iOS() && goos != "js" {
+	// Only run the API check on fast development platforms. Android, iOS, and JS
+	// are always cross-compiled, and the filesystems on our only plan9 builders
+	// are too slow to complete in a reasonable timeframe. Every platform checks
+	// the API on every GOOS/GOARCH/CGO_ENABLED combination anyway, so we really
+	// only need to run this check once anywhere to get adequate coverage.
+	if goos != "android" && !t.iOS() && goos != "js" && goos != "plan9" {
 		t.tests = append(t.tests, distTest{
 			name:    "api",
 			heading: "API check",