Skip to content

Commit

Permalink
update coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Nov 12, 2024
1 parent 9f27ae4 commit f2c8911
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ jobs:
run: make test-coverage
- name: Merge and generate coverage report
run: |
find . -type f -path "*.build/*" -name "*.o"
echo "Finding object files..."
find . -type f -path "*.build/*/debug/*Tests*.o"
echo "Finding Tests files..."
find . -type f -path "*.build/*/*Tests.build" -name "*.o"
mkdir -p coverage
profdata_file="coverage/coverage.profdata"
echo "Merging .profraw files..."
llvm-profdata merge -sparse $(find . -name "*.profraw") -o "$profdata_file"
find . -type f -path "*.build/debug/*" -name "*.o" | while read object_file; do
find . -type f -path "*.build/*/debug/*Tests*.o" | while read object_file; do
if file "$object_file" | grep -iq 'ELF'; then
echo "Processing $object_file"
llvm-cov export -format=lcov -instr-profile=coverage/coverage.profdata "$object_file" >> coverage/coverage.lcov
Expand Down

0 comments on commit f2c8911

Please sign in to comment.