golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.38k stars 17.71k forks source link

x/tools/internal/testenv: remove ExitIfSmallMachine #64499

Open bcmills opened 1 year ago

bcmills commented 1 year ago

Go version

N/A

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

In https://go.dev/cl/192578 (for #32834) I added a testenv.ExitIfSmallMachine helper function that causes the entire test process to exit based on heuristics about the GO_BUILDER_NAME environment variable.

What did you expect to see?

I expected that we would remove ExitIfSmallMachine by either reducing the memory footprint of the x/tools tests or increasing the available memory on the builders.

What did you see instead?

ExitIfSmallMachine has become an attractive nuisance.

In terms of “more appropriate tools”:

findleyr commented 1 year ago

It is now used in four test binaries

It is also used in all of the gopls integration and marker tests -- a total of 13 binaries. We can experiment with simply removing this guard, as the tests have gotten faster and smaller since it was originally added. I expect something will fail, but perhaps we can replace it with a more accurate guard (such as skipping GOOS=android, ios).