Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gocov does not pass -tags parameter #86

Closed
ardias opened this issue May 29, 2020 · 1 comment
Closed

gocov does not pass -tags parameter #86

ardias opened this issue May 29, 2020 · 1 comment

Comments

@ardias
Copy link

ardias commented May 29, 2020

Hi,
when using gocov it seems it does not "respect" the tags parameter.

Example, using go test -tags=integration only runs tests with +build integration constraint, but when using gocov test -tags=integration it runs all tests. Is this by design? Or which order must it be used?

Thank you

@axw
Copy link
Owner

axw commented Jan 18, 2021

@ardias I'm sorry for not responding sooner, notifications were somehow disabled for me and I simply was not aware of this issue.

Tags are additive, so unless you have a build constraint like !integration, then go test -tags=integration will also run all the tests. You can confirm this by passing -v in to print the test names.

There is no bug here. If gocov did not pass the tags, then the integration tests would be not run at all. Nothing special is done with tags, they're just passed along.

@axw axw closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants