-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
Code coverage for cross package tests #995
Comments
hey there - I believe the issue is that In your particular case, try $ ginkgo -r -v -race --trace --cover --coverprofile=.coverage-report.out --coverpkg=./p1 |
@onsi Thanks a lot. Explicitly mentioning the package in the
I believe that this bug can be closed, but if you can update the docs for this particular case, it would be nice. Thank you once again for the helpful library and your comments on the issues. |
it's so strange, why |
I think I understand the issue here. relative paths don't work with I can probably fix that by translating relative paths to absolute paths and then running with those. I'll need to give it a try when I next set aside time to work on ginkgo. |
this should now be fixed in v2.9.1 - |
I reported this issue in stackoverflow initially but since I did not get an answer there, I wanted to bring it up here so that I would know if this is not a supported usecase.
I have the following file structure:
Where, the
p1/p1.go
has a function:which I am testing from a ginkgo test from a different directory:
I execute the cases via:
but ginkgo reports that no code coverage and the .coverage-report.out file is empty, even though I have specified --coverpkg to include all the directories.
Is my expectation wrong and such a coverage across packages not possible with ginkgo ? Or am I doing something wrong ? The
--coverpkg
seems like not doing anything here.The text was updated successfully, but these errors were encountered: