[libvirt] [PATCH 1/1] CI: add code coverage analysis
Martin Kletzander
mkletzan at redhat.com
Thu May 25 06:49:40 UTC 2017
On Thu, May 25, 2017 at 01:14:36AM -0300, claudioandre.br at gmail.com wrote:
>From: Claudio André <claudioandre.br at gmail.com>
>
>It builds the code coverage report and uploads the coverage data to a web service in order to allow to track libvirt's code coverage over time.
>---
You can add the links from the cover letter right here. It is below the
'---' marker, so it won't be part of the commit message, but it is also
before the first 'diff --git', so it won't be considered part of the
patch either. Just like the stats below.
> .travis.yml | 11 ++++++++++-
> README.md | 1 +
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
>diff --git a/.travis.yml b/.travis.yml
>index 266ffff..24b8d6c 100644
>--- a/.travis.yml
>+++ b/.travis.yml
>@@ -39,6 +39,7 @@ addons:
> - dnsmasq-base
> - librbd-dev
> - w3c-dtd-xhtml
>+ - lcov
>
> notifications:
> irc:
>@@ -64,7 +65,8 @@ before_install:
>
> # the custom PATH is just to pick up OS-X homebrew & its harmless on Linux
> before_script:
>- - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./autogen.sh
>+ - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./autogen.sh "$COVERAGE"
>+ - gem install coveralls-lcov
> script:
> - VIR_TEST_DEBUG=1 make -j3 && make -j3 syntax-check && make -j3 check
>
>@@ -77,9 +79,16 @@ matrix:
> dist: trusty
> - compiler: gcc
> dist: trusty
>+ env: COVERAGE="--enable-test-coverage"
> - compiler: clang
> os: osx
> script:
> # many unit tests fail & so does syntax-check, so skip for now
> # one day we must fix it though....
> - make -j3
>+
>+after_success:
>+ - 'if [ -n "${COVERAGE}" ]; then
>+ make -j3 cov;
>+ coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage/libvirt.info;
I like this, but I have no idea where COVERALLS_TOKEN comes from. How
do we make sure that no user branches will post stuff to the
coveralls.io site? I think I can safely guess how the rest works, and
that seems OK.
>+ fi'
>diff --git a/README.md b/README.md
>index 1035bcf..021f71b 100644
>--- a/README.md
>+++ b/README.md
>@@ -1,4 +1,5 @@
> [![Build Status](https://travis-ci.org/libvirt/libvirt.svg)](https://travis-ci.org/libvirt/libvirt)
>+[![Coverage Status](https://coveralls.io/repos/github/libvirt/libvirt/badge.svg)](https://coveralls.io/github/libvirt/libvirt)
>
> Libvirt API for virtualization
> ==============================
>--
>2.11.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170525/1962ecb3/attachment-0001.sig>
More information about the libvir-list
mailing list