]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: skip external tests on linux/arm
authorDave Cheney <dave@cheney.net>
Fri, 7 Aug 2015 01:15:54 +0000 (11:15 +1000)
committerDave Cheney <dave@cheney.net>
Tue, 15 Sep 2015 03:57:49 +0000 (03:57 +0000)
CL 13166 skipped external tests on freebsd/arm with the rationale
that the cmd/go tests are not architecture dependent.

This CL does the same for linux/arm to help linux/arm users who are
building Go on platforms like the Raspberry Pi where ./all.bash
frequently times out due to a lack of resources.

Change-Id: Iae1a25b63b74200da3f1b5637da0fa5c2dceeb83
Reviewed-on: https://go-review.googlesource.com/13342
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/go_test.go

index 6ee9343eb4274fb936ef0faf73fd601ed8b1d56c..3413c8c1eca19e8cfc4e1055a36a1217898eed1d 100644 (file)
@@ -31,8 +31,7 @@ var (
 
        exeSuffix string // ".exe" on Windows
 
-       builder             = testenv.Builder()
-       skipExternalBuilder = false // skip external tests on this builder
+       skipExternal = false // skip external tests
 )
 
 func init() {
@@ -44,14 +43,21 @@ func init() {
                case "arm", "arm64":
                        canRun = false
                }
-       }
-
-       if strings.HasPrefix(builder+"-", "freebsd-arm-") {
-               skipExternalBuilder = true
-               canRun = false
-       }
-
-       switch runtime.GOOS {
+       case "linux":
+               switch runtime.GOARCH {
+               case "arm":
+                       // many linux/arm machines are too slow to run
+                       // the full set of external tests.
+                       skipExternal = true
+               }
+       case "freebsd":
+               switch runtime.GOARCH {
+               case "arm":
+                       // many freebsd/arm machines are too slow to run
+                       // the full set of external tests.
+                       skipExternal = true
+                       canRun = false
+               }
        case "windows":
                exeSuffix = ".exe"
        }
@@ -138,8 +144,8 @@ type testgoData struct {
 func testgo(t *testing.T) *testgoData {
        testenv.MustHaveGoBuild(t)
 
-       if skipExternalBuilder {
-               t.Skip("skipping external tests on %s builder", builder)
+       if skipExternal {
+               t.Skip("skipping external tests on %s/%s", runtime.GOOS, runtime.GOARCH)
        }
 
        return &testgoData{t: t}