-
Notifications
You must be signed in to change notification settings - Fork 653
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
Supporting Code Coverage #1150
Comments
All the things needed to correctly run coverage are done, the issues are how to collect the results and how to display them. |
Is there a way to make a profile |
You can pass arguments to tests on the command line with Note that tests run in a sandbox by default, and Bazel will clean up their output files after they run. You can disable the sandbox with |
the --test_arg method doesn't work is there another way to get this coverage profile besides using the go_path method? This profile is needed to do anything related to code coverage. |
The way to do this is with
I think that used to work, but it doesn't anymore. It looks like we need to set the |
Hello has any progress been made with this? |
I just checked this again with rules_go on master and Bazel 0.10.0rc6, and I'm getting a different error. Not sure if something changed, or I was running it wrong before.
I think this fails because of sandboxing; the test can't write anything outside of the sandbox. Running with
Sorry I know this isn't a great solution. There's a long-term plan for Bazel rules in various languages to all produce coverage data in the same format, then produce unified reports for multiple tests across multiple languages. We'll provide Go support for that as soon as the Bazel backend for it is ready. |
This fixes a filename stutter bug introduced in bazelbuild#1407. Related bazelbuild#1406 Related bazelbuild#1150
An update: Bazel folks are working on coverage support. See the design doc. They are planning to migrate the internal coverage format to Cobertura XML, and they'll generate reports based on that. There are already tools to convert Go coverage data to this format, so once Bazel supports coverage, completing the support in rules_go won't take much work. |
Duplicate of #140? |
Sure, no reason to have two tracking issues for this. |
I noticed that coverage is not supported , but there seems to be some experimental support. How can I contribute to the progression of this feature?
The text was updated successfully, but these errors were encountered: