Skip to content

Instantly share code, notes, and snippets.

@Mytherin
Created October 7, 2021 16:15
Show Gist options
  • Save Mytherin/c687638051248eeaba9ad1ed951a2ad4 to your computer and use it in GitHub Desktop.
Save Mytherin/c687638051248eeaba9ad1ed951a2ad4 to your computer and use it in GitHub Desktop.
Generate DuckDB Coverage Report Locally
lcov --config-file .github/workflows/lcovrc --zerocounters --directory .
lcov --config-file .github/workflows/lcovrc --capture --initial --directory . --base-directory . --no-external --output-file coverage.info
mkdir -p build/coverage
(cd build/coverage && cmake -E env CXXFLAGS="--coverage" cmake -DBUILD_PYTHON=1 -DBUILD_PARQUET_EXTENSION=1 -DENABLE_SANITIZER=0 -DCMAKE_BUILD_TYPE=Debug ../.. && cmake --build .)
build/coverage/test/unittest test/sql/join/inner/test_join.test
lcov --config-file .github/workflows/lcovrc --directory . --base-directory . --no-external --capture --output-file coverage.info
lcov --config-file .github/workflows/lcovrc --remove coverage.info $(< .github/workflows/lcov_exclude) -o lcov.info
genhtml --ignore-errors source lcov.info --legend --title "commit SHA1" --output-directory=build/coverage/coverage-html
open build/coverage/coverage-html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment