From ff647943c706f2183c0ae2c7085bad7aa4d1dedd Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Wed, 6 May 2020 11:54:56 +0100 Subject: [PATCH] internal/testenv: make ExitIfSmallMachine apply to plan9-arm builders Some x/tools tests use too much memory (virtual or real) or other resources to run on "small" builders. Originally only linux-arm was classified as small. This change addes plan9-arm to the list, since it normally runs on Raspberry Pi boards with 1GB of RAM. Partial workaround for golang/go#38772 Change-Id: I93307af10cccf7b1e26d57b9af914c85cf676d43 Reviewed-on: https://go-review.googlesource.com/c/tools/+/232478 Run-TryBot: Bryan C. Mills Reviewed-by: Bryan C. Mills --- internal/testenv/testenv.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/testenv/testenv.go b/internal/testenv/testenv.go index 0cc90d26a5..71f4d6806e 100644 --- a/internal/testenv/testenv.go +++ b/internal/testenv/testenv.go @@ -178,8 +178,12 @@ func NeedsGoPackagesEnv(t Testing, env []string) { // // It should be called from within a TestMain function. func ExitIfSmallMachine() { - if os.Getenv("GO_BUILDER_NAME") == "linux-arm" { + switch os.Getenv("GO_BUILDER_NAME") { + case "linux-arm": fmt.Fprintln(os.Stderr, "skipping test: linux-arm builder lacks sufficient memory (https://golang.org/issue/32834)") os.Exit(0) + case "plan9-arm": + fmt.Fprintln(os.Stderr, "skipping test: plan9-arm builder lacks sufficient memory (https://golang.org/issue/38772)") + os.Exit(0) } }