Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: test -c rebuilds even when target is up to date #15799
shows that the second command does rebuild the test package from the test sources and then rebuild the test binary. If the target test binary exists and has the right build ID, it should be possible to avoid that. This causes headaches for Kubernetes (for example kubernetes/kubernetes#24850) and likely other large projects.
The exact package doesn't matter much; I am using expvar in the example because I know that the testing package does not depend on expvar, which might complicate the analysis.