1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00

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 <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Richard Miller 2020-05-06 11:54:56 +01:00 committed by Bryan C. Mills
parent 625332f3c5
commit ff647943c7

View File

@ -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)
}
}