From 7d9faaa19f4870ed0ac92af26f5552a09a504218 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 5 Aug 2015 10:19:12 -0400 Subject: [PATCH] cmd/go: skip external tests on freebsd-arm builder It is just far too slow. I have a CL for Go 1.6 that makes many of these into internal tests. That will improve the coverage. It does not matter much, because basically none of the go command tests are architecture dependent, so the other builders will catch any problems. Fixes freebsd-arm builder. Change-Id: I8b2f6ac2cc1e7657019f7731c6662dc43e20bfb5 Reviewed-on: https://go-review.googlesource.com/13166 Reviewed-by: Ian Lance Taylor --- src/cmd/go/go_test.go | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 8b5917b633..5b0f2783f3 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -24,17 +24,16 @@ import ( "time" ) -// Whether we can run go or ./testgo. -var canRun = true +var ( + canRun = true // whether we can run go or ./testgo + canRace = false // whether we can run the race detector + canCgo = false // whether we can use cgo -// The suffix for executables, because Windows. -var exeSuffix string + exeSuffix string // ".exe" on Windows -// Whether we can run the race detector. -var canRace bool - -// Whether we can use cgo. -var canCgo bool + builder = testenv.Builder() + skipExternalBuilder = false // skip external tests on this builder +) func init() { switch runtime.GOOS { @@ -47,6 +46,11 @@ func init() { } } + if strings.HasPrefix(builder+"-", "freebsd-arm-") { + skipExternalBuilder = true + canRun = false + } + switch runtime.GOOS { case "windows": exeSuffix = ".exe" @@ -134,6 +138,10 @@ type testgoData struct { func testgo(t *testing.T) *testgoData { testenv.MustHaveGoBuild(t) + if skipExternalBuilder { + t.Skip("skipping external tests on %s builder", builder) + } + return &testgoData{t: t} } -- 2.50.0