SteNicholas commented on code in PR #489: URL: https://github.com/apache/paimon-cpp/pull/489#discussion_r4450434835
########## test/generate_coverage.sh: ########## @@ -20,10 +20,28 @@ set -e cd $(dirname "$0")/../ mkdir -p build && cd build -cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPAIMON_BUILD_TESTS=ON -DPAIMON_USE_ASAN=ON -DPAIMON_GENERATE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPAIMON_BUILD_TESTS=ON -DPAIMON_USE_ASAN=ON -DPAIMON_GENERATE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DPAIMON_ENABLE_AVRO=ON -DPAIMON_ENABLE_ORC=ON \ + -DPAIMON_ENABLE_MOSAIC=ON -DPAIMON_ENABLE_LANCE=ON -DPAIMON_ENABLE_VORTEX=ON make -j make test lcov --capture --directory src/paimon --directory test --output-file coverage.info +# Keep only project implementation code in the report: drop system headers, +# third-party dependencies from the build tree and third_party/, and test +# sources (*_test.cpp, test helpers, mocks). +# PWD is the build directory; do not match checkout ancestors such as /builds/. +# Exclusion patterns can overlap or be absent, so unused patterns are nonfatal. +lcov --remove coverage.info \ + '/usr/*' \ + "$PWD/*" \ + '*/third_party/*' \ + '*_test.cpp' \ + '*/test/*' \ + '*/testing/*' \ + '*mock*' \ Review Comment: **Anchor the remaining exclusions to repository paths**: These patterns also match checkout ancestors. For checkouts at `/tmp/test/paimon-cpp` or `/work/mock-build/paimon-cpp`, they remove every implementation source and header. I reproduced LCOV 2.0 exiting with `no valid records found` using the current filtering block's arguments against synthetic traces, so `set -e` prevents HTML generation. Please anchor test/helper exclusions to the repository root and restrict mock matching to filenames or known mock directories. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
