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