Skip to content

cmd/dist, misc/cgo: drop host test support #59999

@aclements

Description

@aclements

I plan to drop the “host test” mechanism in cmd/dist. Host tests are used for emulated builders that use cross-compilation. Today, this is the android-{386,amd64}-emu builders and all wasm builders. These builders run all.bash on a linux/amd64 host to build all packages and most tests for the emulated guest, and then run the resulting test binaries inside the emulated guest. A small number of test packages are “host tests”: these run on the host rather than the guest because they invoke the Go toolchain themselves (which only lives on the host) and run the resulting binaries in the guest.

However, this host test mechanism is barely used today, despite being quite complex. This complexity is also causing significant friction to implementing structured all.bash output.

Today, excluding internal/testdir, the whole host test mechanism runs a total of 10 test cases on a total of two builders (android-{386,amd64}-emu). There are clearly several tests that are incorrectly being skipped, so we could expand it to cover more test cases, but it would still apply to only two builders. Furthermore, the two other Android builders (android-{arm,arm64}-corellium) build the Go toolchain directly inside Android and also have access to a C toolchain, so they are able to get significantly better test coverage without the use of host tests. This suggests that the android-*-emu builders could do the same.

The internal/testdir package is the other use of host test mode, and the only one that runs on the other cross-compile platform (wasm), but that one on its own should be fairly easy to keep working.

Given the incredibly low value of host tests today, they are not worth their implementation complexity and the friction they cause.

/cc @golang/android @golang/wasm @dmitshur

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions