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

Usage in CI #12

Closed
taiki-e opened this issue Jun 5, 2021 · 6 comments · Fixed by #13
Closed

Usage in CI #12

taiki-e opened this issue Jun 5, 2021 · 6 comments · Fixed by #13
Labels
C-documentation Category: related to documentation.

Comments

@taiki-e
Copy link
Owner

taiki-e commented Jun 5, 2021

codecov claims to support many formats, but it actually happens "There was an error processing coverage reports" errors on the server. It is necessary to understand which formats are actually supported and which ones are preferred to use.

I'm not sure about other code-coverage services as I have never used them.

@taiki-e taiki-e added the C-documentation Category: related to documentation. label Jun 5, 2021
@jhpratt
Copy link

jhpratt commented Jun 5, 2021

Check out the time-rs/time repo. I just added codecov using json successfully. lcov also worked.

@jhpratt
Copy link

jhpratt commented Jun 5, 2021

Actually I stand corrected. JSON does not work. lcov does. https://app.codecov.io/gh/time-rs/time

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 5, 2021

Thanks @jhpratt. I also checked it in my test repository, it seems to work only with lcov. (Uploading of json and text reports succeeded, but an error happened in the server.)

@jhpratt
Copy link

jhpratt commented Jun 5, 2021

No problem. It looks like codecov only cares about line coverage as well, rather than the more detailed report lcov provides. But I'm pretty sure that's on codecov's end.

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 5, 2021

It looks like codecov only cares about line coverage as well, rather than the more detailed report lcov provides. But I'm pretty sure that's on codecov's end.

Hmm. It seems codecov supports branch coverage, so that might be a rustc's problem (#8, rust-lang/rust#79649).

https://docs.codecov.io/docs/about-code-coverage

partial indicates that the source code was not fully executed by the test suite; there are remaining branches that were not executed.

llvm-cov (that used by cargo-llvm-cov internally) also supports the export of branch coverage.

https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-export

When exporting an lcov trace file, the line-based coverage, branch coverage, and summaries will be exported.

@bors bors bot closed this as completed in d10b040 Jun 5, 2021
@taiki-e
Copy link
Owner Author

taiki-e commented Jun 7, 2021

It looks like codecov only cares about line coverage as well, rather than the more detailed report lcov provides. But I'm pretty sure that's on codecov's end.

We can probably support region coverage on codecov by converting llvm-cov's json coverage format to codecov's json coverage format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-documentation Category: related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants