From d6d929aa678c6099e82d103aa112283b37cab982 Mon Sep 17 00:00:00 2001 From: David Korth Date: Sat, 1 Feb 2025 11:06:57 -0500 Subject: [PATCH] [scripts] lcov.sh: Ignore some more errors. TODO: Figure out what's causing these errors and fix them. For now, they're being ignored, since they prevent the coverage report from being generated. --- scripts/lcov.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/lcov.sh b/scripts/lcov.sh index dd62231a5..6bc043ee9 100755 --- a/scripts/lcov.sh +++ b/scripts/lcov.sh @@ -33,7 +33,7 @@ lcov ${LCOV_RC} --directory . --zerocounters # References: # - https://stackoverflow.com/questions/44203156/can-lcov-genhtml-show-files-that-were-never-executed # - https://stackoverflow.com/a/45105825 -lcov ${LCOV_RC} --ignore-errors inconsistent,mismatch \ +lcov ${LCOV_RC} --ignore-errors inconsistent,inconsistent,mismatch \ -c -i -d . -o "${coverage_base_info}" # Run tests. @@ -43,17 +43,17 @@ if [ "$?" != "0" ]; then fi # Capture lcov output from the unit tests. -lcov ${LCOV_RC} --ignore-errors inconsistent,mismatch \ +lcov ${LCOV_RC} --ignore-errors inconsistent,inconsistent,mismatch \ -c -d . -o "${coverage_test_info}" # Combine baseline and unit test output. -lcov ${LCOV_RC} --ignore-errors inconsistent,corrupt,mismatch \ +lcov ${LCOV_RC} --ignore-errors inconsistent,inconsistent,corrupt,mismatch \ -a "${coverage_base_info}" \ -a "${coverage_test_info}" \ -o "${coverage_info}" # Remove third-party libraries and generated sources. -lcov ${LCOV_RC} --ignore-errors unused \ +lcov ${LCOV_RC} --ignore-errors unused,inconsistent \ -o "${coverage_cleaned}" -r "${coverage_info}" \ '*/tests/*' '/usr/*' '*/extlib/*' \ '*/moc_*.cpp' '*.moc' '*/ui_*.h' '*/qrc_*.cpp' \ @@ -69,6 +69,7 @@ lcov ${LCOV_RC} --ignore-errors unused \ '*/libi18n/gettext.h' # Generate the HTML report. -genhtml ${LCOV_RC} -o "${outputname}" "${coverage_cleaned}" +genhtml ${LCOV_RC} --ignore-errors inconsistent,corrupt \ + -o "${outputname}" "${coverage_cleaned}" rm -f "${coverage_base_info}" "${coverage_test_info}" "${coverage_info}" "${coverage_cleaned}" exit 0