-
Notifications
You must be signed in to change notification settings - Fork 456
ci: fix fuzz coverage report #4522
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,11 @@ mkdir -p "$OUTPUT_DIR" | |
|
|
||
| # dont run this command when running in CI | ||
| if [ "$OUTPUT_CODECOV_JSON" = "0" ]; then | ||
| cargo llvm-cov --html --ignore-filename-regex "fuzz/" --output-dir "$OUTPUT_DIR" | ||
| cargo llvm-cov --html \ | ||
| --dep-coverage lightning,lightning-invoice,lightning-liquidity,lightning-rapid-gossip-sync,lightning-persister \ | ||
| --no-default-ignore-filename-regex \ | ||
| --ignore-filename-regex "(\.cargo/registry|\.rustup/toolchains|/fuzz/)" \ | ||
| --output-dir "$OUTPUT_DIR" | ||
| echo "Coverage report generated in $OUTPUT_DIR/html/index.html" | ||
| else | ||
| # Clean previous coverage artifacts to ensure a fresh run. | ||
|
|
@@ -78,7 +82,10 @@ else | |
| fi | ||
|
|
||
| echo "Replaying imported corpus (if found) via tests to generate coverage..." | ||
| cargo llvm-cov -j8 --codecov --ignore-filename-regex "fuzz/" \ | ||
| cargo llvm-cov -j8 --codecov \ | ||
| --dep-coverage lightning,lightning-invoice,lightning-liquidity,lightning-rapid-gossip-sync,lightning-persister \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| --no-default-ignore-filename-regex \ | ||
| --ignore-filename-regex "(\.cargo/registry|\.rustup/toolchains|/fuzz/)" \ | ||
| --output-path "$OUTPUT_DIR/fuzz-codecov.json" --tests | ||
|
|
||
| echo "Fuzz codecov report available at $OUTPUT_DIR/fuzz-codecov.json" | ||
|
|
||
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.
lightning-typesis a transitive dependency (used bylightning,lightning-invoice, andlightning-liquidity) and contains non-trivial code (features.rs,payment.rs,routing.rs,string.rs). It should likely be included in the--dep-coveragelist so that coverage of its code is tracked.Similarly,
possiblyrandomis a dependency oflightningand may warrant inclusion depending on whether its coverage is of interest.