Skip to content

Commit

Permalink
Fix lcov on Ubuntu Noble (#436)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
azeey and scpeters authored Jul 29, 2024
1 parent af0f345 commit 930e17f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/GzCodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ FUNCTION(gz_setup_target_for_coverage)
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} ${_branch_flags} -q --no-checksum
--directory ${PROJECT_BINARY_DIR} --capture
--rc geninfo_unexecuted_blocks=1
--ignore-errors mismatch,mismatch
--output-file ${_outputname}.info 2>/dev/null
# Remove negative counts
COMMAND sed -i '/,-/d' ${_outputname}.info
COMMAND ${LCOV_PATH} ${_branch_flags} -q
--remove ${_outputname}.info '*/test/*' '/usr/*' '*_TEST*' '*.cxx' 'moc_*.cpp' 'qrc_*.cpp' '*.pb.*' '*/build/*' '*/install/*' ${IGNORE_LIST} --output-file ${_outputname}.info.cleaned
--remove ${_outputname}.info --ignore-errors unused,unused '*/test/*' '/usr/*' '*_TEST*' '*.cxx' 'moc_*.cpp' 'qrc_*.cpp' '*.pb.*' '*/build/*' '*/install/*' ${IGNORE_LIST} --output-file ${_outputname}.info.cleaned
COMMAND ${GENHTML_PATH} ${_branch_flags} -q --prefix ${PROJECT_SOURCE_DIR}
--legend -o ${_outputname} ${_outputname}.info.cleaned
COMMAND ${LCOV_PATH} --summary ${_outputname}.info.cleaned 2>&1 | grep "lines" | cut -d ' ' -f 4 | cut -d '%' -f 1 > ${_outputname}/lines.txt
Expand Down

0 comments on commit 930e17f

Please sign in to comment.