-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Overhaul coverage setup #2202
Overhaul coverage setup #2202
Conversation
42797f6
to
8727dc1
Compare
fc5854c
to
256c815
Compare
This all works well on macOS, but blows up on Linux still. 🐧 |
The problem on linux appears to be that the gnco files from the different crates all end up getting written to the same |
e56d93a
to
f73c3f1
Compare
|
534bed3
to
b348a13
Compare
Codecov Report
@@ Coverage Diff @@
## master #2202 +/- ##
=========================================
Coverage ? 56.56%
=========================================
Files ? 109
Lines ? 9047
Branches ? 0
=========================================
Hits ? 5117
Misses ? 3930
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah!
echo "--- grcov" | ||
./grcov target/cov/debug/deps/ > target/cov/lcov_full.info | ||
|
||
echo "--- filter_non_local_files_from_lcov" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to use the -s
option of grcov to achieve the same result (ignore any file which is not in the repository)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sweet, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💔
$ ./grcov target/cov/debug/deps/ -s . > out.lcov
thread 'main' panicked at 'Only one file in the repository should end with src/packet.rs (sdk/src/packet.rs and src/packet.rs both end with that)', src/path_rewriting.rs:143:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks! If you can ping me here I'll be able to give it a test drive when ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed mozilla/grcov#239.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @marco-c, what's generally the best way to contact you? Care to join our Discord forum? https://discord.gg/k8Kq58
* Adds the feature. * Adds the feature gate logic. * Adjusts tests.
* Adds the feature. * Adds the feature gate logic. * Adjusts tests.
This PR gets coverage working again. Humans may run
./scripts/coverage.sh
locally to generate a report.CI runs
./scripts/coverage.sh
on PRs and Pushes if any .rs files are affected. Results are attached to the buildkite job and uploaded to codecov.io.cargo-cov
usage has been removed, it's overly complex and unnecessary.Note that in the buildkite job for this PR, there's a message at the top telling saying "Coverage skipped as no .rs files were modified" -- we skip coverage if the PR has no .rs file changes to help with CI load. Contrast that with the demo PR at #2211.
Fixes #433