summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-04-29 18:04:50 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-04-29 18:06:21 +0200
commit754a98026825b6c3cf8022266f84aeebf57bda8d (patch)
tree015a3c504bcf3c5a45040f648d0627ea603f5286
parent9424a727ab3a720103b3ab6161a9351ae8d40743 (diff)
downloadgnutls-754a98026825b6c3cf8022266f84aeebf57bda8d.tar.gz
.gitlab-ci.yml: added code coverage run
This enhances a test to print the code coverage of the test suite, which in turn is being used/reported by gitlab CI interface.
-rw-r--r--.gitlab-ci.yml9
-rw-r--r--Makefile.am3
2 files changed, 8 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1631c87370..33c278332e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,13 +12,14 @@ Compile minimal library:
- linux
except:
- tags
-Build and Check with asan:
+Build and Check with asan and coverage run:
script:
- - make autoreconf && CFLAGS="-fsanitize=address -g
- -O2" LDFLAGS="-static-libasan" ./configure --disable-doc --with-included-libtasn1 --disable-valgrind-tests --disable-non-suiteb-curves --disable-guile
- && make -j4 && make check -j4
+ - make autoreconf && CFLAGS="-fsanitize=address -g -O2" LDFLAGS="-static-libasan"
+ ./configure --disable-doc --enable-code-coverage --disable-valgrind-tests --disable-non-suiteb-curves --disable-guile &&
+ make -j4 && make check -j4 && make local-code-coverage-output
tags:
- nettle3
+ - lcov
- linux
except:
- tags
diff --git a/Makefile.am b/Makefile.am
index 5564c9189d..4f561e3766 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,9 @@ abi-check:
@CODE_COVERAGE_RULES@
+local-code-coverage-output: code-coverage-capture
+ cat GnuTLS-$(VERSION)-coverage/index.html|grep headerCovTableEntryLo|head -1|sed 's/^.*>\([0-9]\+\.[0-9]\+\s*%\)<.*$$/ coverage lines: \1/'
+
dist-hook: abi-check
make -C doc/ compare-makefile
make -C doc/ compare-exported