Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Add coverage analysis to CI #2

Closed
sgeisler opened this issue Mar 15, 2018 · 0 comments
Closed

Add coverage analysis to CI #2

sgeisler opened this issue Mar 15, 2018 · 0 comments
Labels
enhancement New feature or request meta Issue about the repo, not the code

Comments

@sgeisler
Copy link
Contributor

I tried to add coverage reports to this repository, but it appears that the available tooling isn't that good.

I used kcov and cargo-kcov. To avoid linking errors when running cargo kcov (presumably caused by the -C link-dead-code flag when building with cargo kcov) I had to set the --no-clean-rebuild flag and build the test binary manually beforehand (cargo test --no-run). The problems with link-dead-code are being discussed rust-lang/rust#39293. Unfortunately this leads to optimized/stripped code, so that non-invoked functions don't count to the coverage data.

I won't add kcov to the CI pipeline for now since it produces misleading results. If someone knows how to make it work I'd appreciate any input.

An example of the kcov output can be found here (sorry, needs JS).

(If someone wants to experiment with kcov directly (without cargo kcov) I ran into the problem that some of the automatically set breakpoints are invalid, this can be worked around by setting the --verify flag.)

@sgeisler sgeisler added enhancement New feature or request meta Issue about the repo, not the code labels Mar 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request meta Issue about the repo, not the code
Projects
None yet
Development

No branches or pull requests

1 participant