Skip to content

Commit

Permalink
internal/testenv: make ExitIfSmallMachine apply to plan9-arm builders
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Miller authored and Bryan C. Mills committed May 7, 2020
1 parent 625332f commit ff64794
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/testenv/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit ff64794

Please sign in to comment.