File tree Expand file tree Collapse file tree 4 files changed +21
-27
lines changed Expand file tree Collapse file tree 4 files changed +21
-27
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ jobs:
128
128
# Could you use this to fake the coverage report for your PR? Sure.
129
129
# Will anyone be impressed by your amazing coverage? No
130
130
# Maybe if codecov wasn't broken we wouldn't need to do this...
131
+ ./ci/ci-fuzz.sh
131
132
bash <(curl -s https://codecov.io/bash) -f target/codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57"
132
133
133
134
benchmark :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eox pipefail
3
+
4
+ echo -e " \n\nGenerating fuzz coverage report"
5
+ # In CI, store coverage in a specific directory for artifact collection
6
+ COVERAGE_DIR=" coverage-report"
7
+ echo " Installing cargo-llvm-cov..."
8
+ # Install cargo-llvm-cov if not already installed
9
+ cargo install cargo-llvm-cov --locked
10
+ echo " Running fuzz coverage generation..."
11
+ ./contrib/generate_fuzz_coverage.sh --output-dir " $COVERAGE_DIR "
12
+ echo " Coverage generation completed. Checking results..."
13
+ if [ -f " fuzz/$COVERAGE_DIR /html/index.html" ]; then
14
+ echo " ✓ Coverage report successfully generated at fuzz/$COVERAGE_DIR /html/index.html"
15
+ ls -la " fuzz/$COVERAGE_DIR /html/"
16
+ else
17
+ echo " ✗ Coverage report not found at expected location"
18
+ fi
Original file line number Diff line number Diff line change @@ -158,28 +158,3 @@ RUSTFLAGS="--cfg=async_payments" cargo test --verbose --color always -p lightnin
158
158
RUSTFLAGS=" --cfg=simple_close" cargo test --verbose --color always -p lightning
159
159
[ " $CI_MINIMIZE_DISK_USAGE " != " " ] && cargo clean
160
160
RUSTFLAGS=" --cfg=lsps1_service" cargo test --verbose --color always -p lightning-liquidity
161
-
162
- # Generate fuzz coverage report
163
- echo -e " \n\nGenerating fuzz coverage report"
164
- if [ -n " $CI " ]; then
165
- # In CI, store coverage in a specific directory for artifact collection
166
- COVERAGE_DIR=" coverage-report"
167
- mkdir -p " $COVERAGE_DIR "
168
- echo " Installing cargo-llvm-cov..."
169
- # Install cargo-llvm-cov if not already installed
170
- cargo install cargo-llvm-cov --locked
171
- echo " Running fuzz coverage generation..."
172
- ./contrib/generate_fuzz_coverage.sh --output-dir " $COVERAGE_DIR "
173
- echo " Coverage generation completed. Checking results..."
174
- if [ -f " fuzz/$COVERAGE_DIR /html/index.html" ]; then
175
- echo " ✓ Coverage report successfully generated at fuzz/$COVERAGE_DIR /html/index.html"
176
- ls -la " fuzz/$COVERAGE_DIR /html/"
177
- else
178
- echo " ✗ Coverage report not found at expected location"
179
- echo " Checking what was created in fuzz/$COVERAGE_DIR :"
180
- ls -la " fuzz/$COVERAGE_DIR " || echo " Directory does not exist"
181
- fi
182
- else
183
- # Local development
184
- ./contrib/generate_fuzz_coverage.sh
185
- fi
Original file line number Diff line number Diff line change 3
3
set -x
4
4
5
5
# Parse command line arguments
6
- OUTPUT_DIR=" target/llvm-cov/html "
6
+ OUTPUT_DIR=" coverage-report "
7
7
while [[ $# -gt 0 ]]; do
8
8
case $1 in
9
9
--output-dir)
@@ -56,7 +56,7 @@ export RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz"
56
56
cargo llvm-cov --html --ignore-filename-regex " fuzz/" --output-dir " $OUTPUT_DIR "
57
57
58
58
# Check if coverage report was generated successfully
59
- # The report is generated directly in $OUTPUT_DIR/html/index.html
59
+ # The report is generated in $OUTPUT_DIR/html/index.html when using --html --output-dir
60
60
if [ ! -f " $OUTPUT_DIR /html/index.html" ]; then
61
61
echo " Error: Failed to generate coverage report at $OUTPUT_DIR /html/index.html"
62
62
# Debug: list what was actually created
You can’t perform that action at this time.
0 commit comments