You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, there is go test -c -o /dev/null. That does the link step, but it doesn't run anything.
ianlancetaylor
changed the title
Proposal: cmd/go test -compile
proposal: cmd/go: add "go test -compile" option to just compile tests, not link or run them
Jun 11, 2021
This proposal is a duplicate of a previously discussed proposal, as noted above,
and there is no significant new information to justify reopening the discussion.
The issue has therefore been declined as a duplicate.
— rsc for the proposal review group
Propose we add a
-compile
flag togo test
that just compiles the tests without linking or running them.Right now we have to do something like go test -run=xxx, which is not very discoverable, and takes the time to link and run the test executables.
For larger projects this can be a big time savings, as well as being more discoverable.
I use the -run=xxx thing all the time to find places where tests won't compile from changes in code.
The text was updated successfully, but these errors were encountered: