Commit 08ecdae2 authored by Mathieu Giraud's avatar Mathieu Giraud

.travis.yml/Makefile: better 'make unit_coveralls' rule to upload to...

.travis.yml/Makefile: better 'make unit_coveralls' rule to upload to coveralls.io, runs tests only once

Note that only the results of unit tests are uploaded, and not the results of should_get tests.
parent f4793c17
......@@ -5,7 +5,7 @@ before_install:
- sudo pip install cpp-coveralls
before_script: make data ; make germline
script: make && make test
script: make COVERAGE=1 && make COVERAGE=1 test
after_success:
- make COVERAGE=1 unit should ; ln -s algo/core . ; coveralls --exclude algo/tests --exclude algo/tools --gcov-options '\-lp'
- make should_coveralls
......@@ -38,15 +38,28 @@ should: all
make COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests should
@echo "*** All .should_get tests passed"
### Code coverage
coverage: unit_coverage should_coverage
unit_coverage: clean
make COVERAGE=1 unit
which gcovr > /dev/null && (cd algo; gcovr -r . -e tests/ --xml > unit_coverage.xml) || echo "gcovr is needed to generate a full report"
should_coverage: clean
make COVERAGE=1 should
### Reports with gcovr
unit_gcovr: unit_coverage
which gcovr > /dev/null && (cd algo; gcovr -r . -e tests/ --xml > unit_coverage.xml) || echo "gcovr is needed to generate a full report"
should_gcovr: should_coverage
which gcovr > /dev/null && (cd algo; gcovr -r . -e tests/ --xml > should_coverage.xml) || echo "gcovr is needed to generate a full report"
### Upload to coveralls.io
unit_coveralls:
coveralls --exclude release --exclude algo/tests --exclude algo/tools --gcov-options '\-lp'
should_coveralls:
coveralls --exclude release --exclude algo/tests --exclude algo/tools --gcov-options '\-lp' -r algo
data germline: %:
make -C $@
......
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