Commit a2de3eb8 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

travis: add coveralls.io support

I suggest to add support for coveralls.io.
It can't show all coverage, as we don't run all tests on travis,
but still everyone who forked CRIU can see instant coverage of
his Travis build. As a nice feature, it will show code cover
increasing/decreasing just after you push a commit - which
could give you a nice hint about content of a new tests.
For this feature, we need to build CRIU with `make GCOV=1`,
which adds --coverage and disables optimizations.

The resulting report looks like this:
https://coveralls.io/builds/6439346
I was thinking about codecov.io also, but it has fewer community,
less fixed issues on github - so I choose this service.

Just a random fun fact:
file-ids.c covered completely on tests, except -ENOMEM return.
Maybe it worth to run fault injections tests on Travis.
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent e47c3684
......@@ -11,3 +11,8 @@ env:
script:
- sudo make -C scripts/build $TR_ARCH
- sudo ./scripts/travis-tests $TR_ARCH
after_success:
- sudo apt-get install -qq -y lcov
- gem install coveralls-lcov
- sudo lcov --directory criu --capture --output-file coverage.info
- coveralls-lcov coverage.info
......@@ -6,7 +6,7 @@ test "$1" = "x86_64" || exit 0
apt-get update -qq
apt-get install -qq protobuf-c-compiler libprotobuf-c0-dev libaio-dev libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev libnl-3-dev
chmod a+x $HOME
make
make GCOV=1
make -C test/zdtm
python test/zdtm.py run -a -f h,ns -x 'cgroup*'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment