From: Michal Nowak Date: Mon, 24 Jul 2023 15:30:35 +0000 (+0200) Subject: Drop unnecessary gcovr workarounds X-Git-Tag: v9.16.44~9^2~2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=182f9fb067fdad8280947a22a23e4eea8026dc93;p=thirdparty%2Fbind9.git Drop unnecessary gcovr workarounds Many problems of the Debian 11 gcovr version were fixed in the Debian 12 one. Replace workarounds we accumulated over the years with two new, simple ones. (cherry picked from commit 55f5aa08f0371afeb1e5292dffe56246ffdbb6ee) --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e623b583a6..6e66bf06624 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1742,28 +1742,20 @@ gcov: - job: system:gcc:bookworm:amd64 artifacts: true script: - # *.gcno and *.gcda files generated for shared library objects are created - # in directories in which gcovr is unable to process them properly - # (.../.libs/...). Move such *.gcno and *.gcda files one level higher. - - find . -regex ".*/\.libs/.*\.\(gcda\|gcno\)" -execdir mv "{}" .. \; - # Help gcovr process the nasty tricks in lib/dns/code.h, where we include C - # source files from lib/dns/rdata/*/, using an even nastier trick. - - find lib/dns/rdata/* -name "*.c" -execdir cp -f "{}" ../../ \; - # These drivers are built into bin/named/named in a way which trips up - # gcovr. Copy them to where gcovr expects them. - - cp contrib/dlz/drivers/{dlz_drivers,dlz_filesystem_driver,sdlz_helper}.c bin/named/ - # Help gcovr find dlz_dbi.c file - - for DST in ldap mysql mysqldyn sqlite3 wildcard; do cp contrib/dlz/modules/common/dlz_dbi.c "contrib/dlz/modules/${DST}"; done + # The "a-conftest.gcno" file is result of the ./configure step and + # should be removed as it does not belong to the BIND 9 code base. + - rm a-conftest.gcno # Generate XML file in the Cobertura XML format suitable for use by GitLab # for the purpose of displaying code coverage information in the diff view # of a given merge request. - - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' --xml -o coverage.xml - - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' --html-details -o coverage.html - - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' -o coverage.txt + - gcovr --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude tests --cobertura-pretty -o coverage.xml + - gcovr --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude tests --html-details -o coverage.html + - gcovr --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude tests --txt -o coverage.txt - tail -n 3 coverage.txt artifacts: paths: - coverage*.html + - coverage.css - coverage.txt - coverage.xml reports: