-
Notifications
You must be signed in to change notification settings - Fork 516
fix kj-test & wd-test test coverage reporting #5881
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
da41935 to
d4b324c
Compare
3597eca to
9c70d73
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5881 +/- ##
===========================================
- Coverage 68.10% 48.86% -19.24%
===========================================
Files 29 397 +368
Lines 2593 105997 +103404
Branches 15 17965 +17950
===========================================
+ Hits 1766 51797 +50031
- Misses 827 45671 +44844
- Partials 0 8529 +8529 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
07c8316 to
bc27dfb
Compare
bc27dfb to
1d9a143
Compare
85a4d0a to
c69da44
Compare
fhanau
left a comment
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.
Added a couple of suggestions – it's a lot but I hope they'll help with some of the issues you've encountered with coverage.
| build:coverage --copt=-fno-lto | ||
| build:coverage --linkopt=-fno-lto | ||
| # Disable test result caching to ensure fresh coverage data is generated | ||
| coverage --nocache_test_results |
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.
nit: I'm not convinced this is needed – with remote_download_minimal you'd expect that coverage data is not downloaded, try using remote_download_toplevel (which is already the default so just ensuring that remote_download_minimal isn't being set anywhere should help). See https://blog.bazel.build/2023/10/06/bwob-in-bazel-7.html for more info on bazel caching modes.
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.
Under remote execution (which we don't use, but might still apply), it states that:
Bazel will fail to create coverage information if tests have been cached previously. To work around this, --nocache_test_results can be set specifically for coverage runs, although this of course incurs a heavy cost in terms of test times.
I'm not sure if this still holds or not.
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.
|
+1 on extracting v8 (and pretty much every other external library) from coverage to get speed under control. I am also quite surprised by the amount of tests excluded. They seem to be incredibly useful? We should try to have the build fast enough to include as much as possible. |
17f504e to
eeca57f
Compare
|
Rebased and force pushed. |
|
Temporarily removed main branch requirement of coverage CI. |
eeca57f to
ef22439
Compare
43fbbf4 to
fc00be3
Compare
|
Marking it as draft for now. While reverting the wd_test changes the coverage started failing again. Unfortunately, custom rule doesn't play well with coverage and we need sh_test in order to generate coverage reports correctly. I'll try to find a common ground. |
fc00be3 to
3229340
Compare
3229340 to
8d45d41
Compare
This pull-request ensures that Rust tests, wd_test and kj_test are generating proper test coverage (and with correct line coverages).
Current state of the test coverage on main branch can be accessed from https://app.codecov.io/gh/cloudflare/workerd
Improvements
Tests done to improve the speed of the test coverage runner:
experimental_split_coverage_postprocessingwhich had the highest impact on reducing the coverage duration.Current Issues
Some ongoing issues with test coverage:
experimental_split_coverage_postprocessing. In order to fix Rust test coverage, we need to land fix collect coverage script to work with recent changes bazelbuild/rules_rust#3812, and update our rules_rust.