Open
Conversation
Add support for LLVM source-based code coverage instrumentation, enabling developers and CI to generate coverage reports for the Core Lightning codebase. Build System: - Add coverage-clang-collect and coverage-clang-report Makefile targets - Fix missing endif for PYTEST_TESTS conditional - Respect CARGO_TARGET_DIR environment variable for Rust builds Coverage Scripts (contrib/coverage/): - collect-coverage.sh: Merges .profraw files with validation and batching - generate-coverage-report.sh: Generates HTML reports using llvm-cov CI Workflow: - coverage.yaml: Daily workflow for building, testing, and publishing reports Usage: ./configure --enable-coverage CC=clang make -j$(nproc) CLN_COVERAGE_DIR=/tmp/cln-coverage make pytest make coverage-clang Changelog-Changed: Added LLVM source-based code coverage support with CI integration
54dea46 to
4a85b8b
Compare
Member
Author
|
@rustyrussell sorry for forgetting the script files in the coverage PR. It was being covered by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for LLVM source-based code coverage instrumentation, enabling developers and CI to generate coverage reports for the Core Lightning codebase.
Changes
Build System
coverage-clang-collectandcoverage-clang-reporttargets for collecting and generating coverage reportsendifforPYTEST_TESTSconditionalCARGO_TARGET_DIRenvironment variable for Rust buildsCoverage Scripts (
contrib/coverage/).profrawfiles into a single.profdatafile with validation, parallel processing, and batch handling for large file countsllvm-cov showfor all instrumented binariesCI Workflow
Usage
Notes
-fprofile-instr-generate -fcoverage-mapping).profrawfiles