We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/pingcap/tiflash/blob/739d1685ab787b0f926afe8d43e15fffc2aa2926/README.md#generate-llvm-coverage-report
Reference: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
A possible scripts
set -x ## Reference: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html PROF_DIR="/DATA/disk1/jaysonhuang/tiflash/cmake-build-debug-cov" # Build the testing binary cd ${PROF_DIR} && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DTEST_LLVM_COVERAGE=ON && ninja -j 32 gtests_dbms && cd - # Run the testing binary and generate prof raw data #LLVM_PROFILE_FILE="${PROF_DIR}/gtest_dbms.profraw" ${PROF_DIR}/dbms/gtests_dbms --gtest_filter='*DeltaMergeStore*:*DMFile*:*Segment*' 2>&1 | tee ${PROF_DIR}/coverage_test.output.log LLVM_PROFILE_FILE="${PROF_DIR}/gtest_dbms.profraw" ${PROF_DIR}/dbms/gtests_dbms 2>&1 | tee ${PROF_DIR}/coverage_test.output.log # Collect the prof raw data and generate cov report llvm-profdata merge -sparse ${PROF_DIR}/*.profraw -o ${PROF_DIR}/merged.profdata TEST_BIN_PATH="${PROF_DIR}" TEST_BINS="${TEST_BIN_PATH}/dbms/gtests_dbms" export LD_LIBRARY_PATH=. llvm-cov export \ ${TEST_BINS} \ --format=lcov \ --instr-profile ${PROF_DIR}/merged.profdata \ --ignore-filename-regex "/usr/include/.*" \ --ignore-filename-regex "/usr/local/.*" \ --ignore-filename-regex "/usr/lib/.*" \ --ignore-filename-regex ".*/contrib/.*" \ --ignore-filename-regex ".*/dbms/src/Debug/.*" \ --ignore-filename-regex ".*/dbms/src/Client/.*" \ > ${PROF_DIR}/lcov.info mkdir -p "${PROF_DIR}/report" genhtml "${PROF_DIR}/lcov.info" -o "${PROF_DIR}/report/" --ignore-errors source
The text was updated successfully, but these errors were encountered:
tests: Add code coverage scripts (#8922)
adc57e2
ref #8889
tests: Add code coverage scripts (pingcap#8922)
9ac28b4
ref pingcap#8889
No branches or pull requests
Enhancement
https://github.com/pingcap/tiflash/blob/739d1685ab787b0f926afe8d43e15fffc2aa2926/README.md#generate-llvm-coverage-report
Reference: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
A possible scripts
The text was updated successfully, but these errors were encountered: