expire_in: "1 day"
when: on_failure
+.system_test_gcov: &system_test_gcov_job
+ <<: *system_test_common
+ artifacts:
+ untracked: true
+ expire_in: "1 day"
+ when: always
+
.system_test_tsan: &system_test_tsan_job
<<: *system_test_common
allow_failure: true
expire_in: "1 day"
when: on_failure
+.unit_test_gcov: &unit_test_gcov_job
+ <<: *unit_test_common
+ artifacts:
+ untracked: true
+ expire_in: "1 day"
+ when: always
+
.unit_test_tsan: &unit_test_tsan_job
<<: *unit_test_common
after_script:
gcc:buster:amd64:
variables:
CC: gcc
- CFLAGS: "${CFLAGS_COMMON}"
- EXTRA_CONFIGURE: "${WITH_READLINE_LIBEDIT}"
+ CFLAGS: "${CFLAGS_COMMON} --coverage -O0"
+ EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 ${WITH_READLINE_LIBEDIT}"
<<: *debian_buster_amd64_image
<<: *build_job
system:gcc:buster:amd64:
<<: *debian_buster_amd64_image
- <<: *system_test_job
+ <<: *system_test_gcov_job
needs:
- - job: gcc:buster:amd64
+ - job: unit:gcc:buster:amd64
artifacts: true
unit:gcc:buster:amd64:
<<: *debian_buster_amd64_image
- <<: *unit_test_job
+ <<: *unit_test_gcov_job
needs:
- job: gcc:buster:amd64
artifacts: true
gcov:
<<: *base_image
- stage: build
+ <<: *default_triggering_rules
+ stage: postcheck
needs:
- - job: autoreconf
+ - job: system:gcc:buster:amd64
artifacts: true
- variables:
- CC: gcc
- CFLAGS: "${CFLAGS_COMMON} --coverage -O0"
- EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
script:
- - *configure
- - *setup_interfaces
- - *setup_softhsm
- - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- - make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1 || true
- - make -C bin/tests/system -j${TEST_PARALLEL_JOBS:-1} -k check V=1 || cat bin/tests/system/test-suite.log
# *.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.
# 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 "{}" ../../ \;
+ # 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 libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' --xml -o coverage.xml
- gcovr --root . --exclude-directories bin/tests --exclude-directories doc --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 libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' -o coverage.txt
- tail -n 3 coverage.txt
artifacts:
paths:
- coverage*.html
- only:
- - main@isc-projects/bind9
- - /^v9_[1-9][0-9]$/@isc-projects/bind9
+ - coverage.txt
+ - coverage.xml
+ reports:
+ cobertura: coverage.xml
# Pairwise testing of ./configure options