Skip to content

Commit

Permalink
generate html coverage reports. (GPSBabel#281)
Browse files Browse the repository at this point in the history
* generate html coverage reports.

* tweak coverage recipe.
  • Loading branch information
tsteven4 authored Dec 2, 2018
1 parent a311bd6 commit ce7f639
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ matrix:
packages:
- libusb-dev
- gcovr
- lcov
cache:
directories:
- $HOME/Qt
Expand Down
6 changes: 4 additions & 2 deletions GPSBabel.pro
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,16 @@ QMAKE_EXTRA_TARGETS += clang-tidy
# generate coverage report for codacy
# must use gcc, g++
# dependencies:
# extra ubuntu bionic packages: gcovr
# extra ubuntu bionic packages: gcovr lcov
linux{
coverage.commands = make clean;
coverage.commands += rm -f gpsbabel_coverage.xml;
coverage.commands += ln -sf GPSBabel gpsbabel;
coverage.commands += $(MAKE) CFLAGS=\"$(CFLAGS) -fprofile-arcs -ftest-coverage\" CXXFLAGS=\"$(CXXFLAGS) -fprofile-arcs -ftest-coverage\" LFLAGS=\"$(LFLAGS) --coverage\" &&
coverage.commands += ./testo &&
coverage.commands += gcov -r -o . $(SOURCES) &&
coverage.commands += gcovr -r . --xml --exclude='zlib/*' --exclude='shapelib/*' -o gpsbabel_coverage.xml;
coverage.commands += gcovr -k -r . --xml --exclude='zlib/*' --exclude='shapelib/*' -o gpsbabel_coverage.xml;
coverage.commands += lcov --capture --directory . --no-external --output-file coverage.info;
coverage.commands += genhtml coverage.info --output-directory coverage_report;
QMAKE_EXTRA_TARGETS += coverage
}

0 comments on commit ce7f639

Please sign in to comment.