]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
.gitlab-ci.yml: added code coverage run
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 Apr 2016 16:04:50 +0000 (18:04 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 Apr 2016 16:06:21 +0000 (18:06 +0200)
This enhances a test to print the code coverage of the test suite,
which in turn is being used/reported by gitlab CI interface.

.gitlab-ci.yml
Makefile.am

index 1631c8737046d7efe3c9803db793945fb8fcdbac..33c278332ebbbf3e6300f8c1f451d87f20476954 100644 (file)
@@ -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
index 5564c9189d0106052271b46e72bcc9d4ed77a754..4f561e3766e6fab3648280cc45d8cbbb42a7e1bc 100644 (file)
@@ -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