Go 1.20 adds binary instrumentation for code coverage (https://go.dev/testing/coverage/#running).
We have a kind of "meta test" that is passed the path of a test binary for another package and invokes it. I want to instrument this binary for coverage (where I can use GOCOVERDIR to dump the coverage data in a directory). Currently we build the binary using `go test -c` but if I pass `-cover` to `go test` it will build in the test-specific logic for coverage, not the one for binaries. I realize this is an odd question, and perhaps the correct thing to do is to create a regular command that runs those "inner" tests. But I'm still curious if there's a lower-level way of building the test binary with the right kind of instrumentation. Thanks, -Radu -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8c30074f-884a-44d6-84fa-db937438d8abn%40googlegroups.com.