I'd like to cherry-pick this into our Go tree, for future use in our CI, in https://github.com/tailscale/gotst/:
https://go-review.googlesource.com/c/go/+/739161
cmd/go: add 'go test -cachelink' boolean flag
This permits (opt-in via a new flag) running package tests faster in
subsequent runs with different -test.run=... flags, at the expense of
writing more to the build cache.
From the change:
-cachelink
Cache the emphemeral test binary (the linker output) in the build
cache. This avoids re-linking the test binary if running the same
test binary repeatedly but with different flags, environment,
or other test inputs such that the test caching rules above
would not apply. On such case is Go test wrappers that shard tests
within a package across multiple machines, sharing a common build
cache with GOCACHEPROG.
/cc @tailscale/tooling
I'd like to cherry-pick this into our Go tree, for future use in our CI, in https://github.com/tailscale/gotst/:
https://go-review.googlesource.com/c/go/+/739161
From the change:
/cc @tailscale/tooling