Skip to content

Commit a79e68d

Browse files
Include contracts
1 parent 8e6791d commit a79e68d

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

scripts/development/create-lcov-report.sh

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@
33
# Output file for the merged result
44
MERGED_FILE="merged-lcov.info"
55

6-
# Create or empty the merged file
7-
mkdir -p coverage
6+
# Ensure output directory exists and clear previous file
87
> "$MERGED_FILE"
98

10-
# Process each package
9+
# Handle packages/*
1110
for pkg in packages/*; do
1211
LCOV_IN="$pkg/coverage/lcov.info"
13-
LCOV_FIXED="$pkg/coverage/lcov-fixed.info"
1412

1513
if [ -f "$LCOV_IN" ]; then
16-
echo "Fixing paths in $pkg"
17-
# Prefix SF paths with the package path and save to fixed file
18-
sed "s|^SF:|SF:$pkg/|" "$LCOV_IN" > "$LCOV_FIXED"
19-
20-
# Append to the merged file
21-
cat "$LCOV_FIXED" >> "$MERGED_FILE"
14+
echo "Merging $LCOV_IN"
15+
sed "s|^SF:|SF:$pkg/|" "$LCOV_IN" >> "$MERGED_FILE"
2216
fi
2317
done
2418

19+
# Handle contracts/lcov.info
20+
CONTRACTS_LCOV="contracts/lcov.info"
21+
22+
if [ -f "$CONTRACTS_LCOV" ]; then
23+
echo "Merging $CONTRACTS_LCOV"
24+
sed "s|^SF:|SF:contracts/|" "$CONTRACTS_LCOV" >> "$MERGED_FILE"
25+
fi
26+
2527
echo "✅ Merged LCOV written to $MERGED_FILE"

0 commit comments

Comments
 (0)