-
Notifications
You must be signed in to change notification settings - Fork 242
Produce code coverage in CI #3327
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3327 +/- ##
=======================================
Coverage ? 56.99%
=======================================
Files ? 230
Lines ? 30204
Branches ? 7321
=======================================
Hits ? 17215
Misses ? 7333
Partials ? 5656 Continue to review full report at Codecov.
|
Note: Coverage is low because of NSS CI build error :( Will dig later. |
Update: I believe the reasons for the failures here are that -Clink-dead-code (required for accurate coverage) is causing code that's usually DCEd to be linked in, and that code has linker errors. |
This is ready for review! The comments in emit_coverage_info.sh should help explain where we ended up here, but TLDR:
|
Generate code coverage: | ||
docker: | ||
- image: circleci/rust:latest | ||
resource_class: large |
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.
Note: this would increase our CI cost substantially (but it is way worth it)
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.
Looks like large
instead of xlarge
works...
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've made normal tests use large
too -- that's not really necessary to do in this PR, but it seems good to land the "reduce CI costs" patch at the same time as the "increase CI costs" patch.
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.
Great! Excited to see this in action and iterate on it over time, thank you for pushing through on all the details here.
cargo +nightly run -p protobuf-gen -- tools/protobuf_files.toml || true | ||
cargo +nightly run -p systest || true | ||
|
||
env RUSTFLAGS="--cfg __appsvc_ci_hack $RUSTFLAGS" cargo +nightly test --all --all-features --no-fail-fast || true |
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.
What is __appsvc_ci_hack
? (I mean I can kind of guess from the name, but I can't find an other uses of it in this PR).
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.
That's because it isn't from this PR, but from #3343.
Sadly, this can't see a lot of test code, but is better than nothing.
Pull Request checklist
automation/all_tests.sh
runs to completion and produces no failures[ci full]
to the PR title.