From 3bf91e530eb8bda748c9169c635d819e298450e7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 29 May 2026 00:01:54 +0200 Subject: [PATCH] ci: use absolute LLVM_PROFILE_FILE path to fix 0% coverage The test suite spawns the grep binary inside per-test temporary directories (via uutests). With a relative LLVM_PROFILE_FILE, each subprocess wrote its .profraw into that tempdir, which gets deleted when the test ends, so the binary executing the src/ code left no coverage data and grcov reported every line as a miss (0%). Anchoring the path to the workspace root makes the profraw files survive, raising reported coverage from 0% to ~96%. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e66b36e..9551318 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: RUSTC_WRAPPER: "" RUSTFLAGS: "-Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" - LLVM_PROFILE_FILE: "grep-%p-%m.profraw" + LLVM_PROFILE_FILE: "${{ github.workspace }}/grep-%p-%m.profraw" - name: Install grcov shell: bash