From 75c298475c5762a5336bc6001ab9ac169668b0ed Mon Sep 17 00:00:00 2001 From: MacOMNI <414294494@qq.com> Date: Tue, 12 Nov 2024 16:49:12 +0800 Subject: [PATCH] update coverage --- .github/workflows/coverage.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 279481e1..d16c3edd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -78,7 +78,9 @@ jobs: find . -type f -path "*.build/*/debug/*Tests*.o" mkdir -p coverage echo "Merging .profraw files..." - llvm-profdata merge -sparse -f $(find . -name "*.profraw") -o coverage/coverage.profdata + find . -name "*.profraw" -print0 | xargs -0 llvm-profdata merge -sparse -f -o coverage/coverage.profdata + llvm-cov show ./your_binary -instr-profile=coverage/coverage.profdata + echo "Generating coverage report..." find . -type f -path "*.build/*/debug/*Tests*.o" -print | while read object_file; do echo "Processing $object_file" llvm-cov export -format=lcov -instr-profile=coverage/coverage.profdata "$object_file" >> coverage/coverage.lcov