Commit af261a5c authored by Dave Cheney's avatar Dave Cheney

cmd/go: skip external tests on linux/arm

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/13342Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent d7c12042
...@@ -31,8 +31,7 @@ var ( ...@@ -31,8 +31,7 @@ var (
exeSuffix string // ".exe" on Windows exeSuffix string // ".exe" on Windows
builder = testenv.Builder() skipExternal = false // skip external tests
skipExternalBuilder = false // skip external tests on this builder
) )
func init() { func init() {
...@@ -44,14 +43,21 @@ func init() { ...@@ -44,14 +43,21 @@ func init() {
case "arm", "arm64": case "arm", "arm64":
canRun = false canRun = false
} }
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":
if strings.HasPrefix(builder+"-", "freebsd-arm-") { switch runtime.GOARCH {
skipExternalBuilder = true case "arm":
// many freebsd/arm machines are too slow to run
// the full set of external tests.
skipExternal = true
canRun = false canRun = false
} }
switch runtime.GOOS {
case "windows": case "windows":
exeSuffix = ".exe" exeSuffix = ".exe"
} }
...@@ -138,8 +144,8 @@ type testgoData struct { ...@@ -138,8 +144,8 @@ type testgoData struct {
func testgo(t *testing.T) *testgoData { func testgo(t *testing.T) *testgoData {
testenv.MustHaveGoBuild(t) testenv.MustHaveGoBuild(t)
if skipExternalBuilder { if skipExternal {
t.Skip("skipping external tests on %s builder", builder) t.Skip("skipping external tests on %s/%s", runtime.GOOS, runtime.GOARCH)
} }
return &testgoData{t: t} return &testgoData{t: t}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment