From ab662223d0e4c1326198c78c3a82e3cb8fab66a2 Mon Sep 17 00:00:00 2001 From: MacOMNI <414294494@qq.com> Date: Mon, 11 Nov 2024 17:55:32 +0800 Subject: [PATCH] update test --- .github/workflows/coverage.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b88d639b..3ddfeaef 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -74,17 +74,12 @@ jobs: run: | mkdir -p coverage find . -name "*.profraw" -exec llvm-profdata merge -sparse {} -o coverage/coverage.profdata \; - # find executable files - executables=$(find .build/debug -type f -executable) - # generate lcov coverage report - for executable in $executables; do + find .build/debug -type f -name "*.xctest" -exec file {} \; | grep -i 'executable' | cut -d: -f1 | while read executable; do if [ -f "$executable" ]; then + echo "Generating coverage for $executable" llvm-cov export -format=lcov -instr-profile=coverage/coverage.profdata "$executable" >> coverage/coverage.lcov - else - echo "Warning: $executable not found." fi done - - name: List Coverage Files run: | echo "Checking coverage files..."