Skills

Coverage

Measure FalkorDB code coverage with LLVM source-based instrumentation across Rust unit...

Install

npx skills add FalkorDB/FalkorDB --skill coverage -g -a claude-code -y
Repository
FalkorDB/FalkorDB10.5k
Category
Testing
Updated
3d ago
License
See repository
Context cost
Lightabout 1,074 tokens
Runs scripts
No, instructions only

What it does

Measure FalkorDB code coverage with LLVM source-based instrumentation across Rust unit tests, Python e2e/MVCC/concurrency tests, flow tests, and TCK - producing an lcov report. Use when asked to measure/report test coverage or reproduce the CI coverage job locally.

Coverage

LLVM source-based coverage (-C instrument-coverage) over the same suites CI runs. llvm-profdata/llvm-cov must match the LLVM that built the binary, the devcontainer ships llvm-profdata-22/llvm-cov-22; locally use whatever suffix matches your LLVM (drop the suffix if you only have one). Also needs lcov (brew install lcov / apt install lcov).

Full coverage (Rust unit + Python + flow + TCK)

# clean stale coverage data first
find . -name "*.profraw" -delete
rm -f cov.profdata codecov.txt codecov.txt.all

# build + Rust unit tests, instrumented.
# The link-arg is required on Linux/CI so the embedded RediSearch static libs
# link without duplicate-symbol errors; drop it with macOS's linker. RUSTDOCFLAGS
# instruments doctests too, matching CI.
COV_RUSTFLAGS="-C instrument-coverage -C link-arg=-Wl,--allow-multiple-definition"
RUSTFLAGS="$COV_RUSTFLAGS" RUSTDOCFLAGS="$COV_RUSTFLAGS" cargo build
RUSTFLAGS="$COV_RUSTFLAGS" RUSTDOCFLAGS="$COV_RUSTFLAGS" cargo test -p graph

# instrumented Python + flow + TCK suites (module already built above)
source venv/bin/activate 2>/dev/null || source /data/venv/bin/activate
pytest tests/test_e2e.py tests/test_functions.py tests/test_mvcc.py tests/test_concurrency.py -vv
./flow.sh
TCK_DONE=tck_done.txt pytest tests/tck/test_tck.py -s

# pass each unit-test binary as an extra -object so llvm-cov also credits
# coverage recorded by test-only code paths (CI does this; without it those
# lines under-report)
TEST_OBJECTS=""
for bin in $(RUSTFLAGS="$COV_RUSTFLAGS" cargo test -p graph --no-run 2>&1 \
    | grep -w Executable | grep -oE 'target/debug/deps/[^)]+'); do
  TEST_OBJECTS="$TEST_OBJECTS -object $bin"
done
Read the whole SKILL.md on GitHub

More in Testing