From: Michal Nowak Date: Fri, 18 Nov 2022 12:30:32 +0000 (+0100) Subject: Exclude fuzz directory from code coverage report X-Git-Tag: v9.19.8~48^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b5e9666c68bc54bb21ffdbb2bb47605cf779313;p=thirdparty%2Fbind9.git Exclude fuzz directory from code coverage report gcovr fails to process fuzz/old.gcda and fuzz/old.gcno files after !7045 MR with: (WARNING) GCOV produced the following errors processing /builds/isc-projects/bind9/fuzz/old.gcda: Cannot open source file ../../fuzz/old.c Cannot open source file ../../lib/dns/include/dns/compress.h Cannot open source file ../../lib/isc/include/isc/buffer.h ... (gcovr could not infer a working directory that resolved it.) Given that code coverage inspection is meant only for BIND 9 code and not its tests and auxiliary tools, the "fuzz" directory should be excluded from being included in the code coverage report. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c37986825f8..2a048e26086 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1458,9 +1458,9 @@ gcov: # 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 lib/samples --exclude tests --xml -o coverage.xml - - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories lib/samples --exclude tests --html-details -o coverage.html - - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories lib/samples --exclude tests -o coverage.txt + - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories lib/samples --exclude tests --xml -o coverage.xml + - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories lib/samples --exclude tests --html-details -o coverage.html + - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories lib/samples --exclude tests -o coverage.txt - tail -n 3 coverage.txt artifacts: paths: