travis: Add code coverage on success

Update the code coverage of the project on codecov for easy viewing.

Also the gcov on travis uses a different version which cannot
find the directory of the given files, and it needs to be specified
in the -o flag. Hence now we loop over the list of files and
run them independently.
This commit is contained in:
AbdealiJK
2016-12-03 23:06:11 +05:30
committed by Tianqi Chen
parent 61a9b3a49e
commit 8eb69e0677
3 changed files with 8 additions and 2 deletions

View File

@@ -160,7 +160,9 @@ check: test
ifeq ($(TEST_COVER), 1)
cover: check
gcov -pbcu $(COVER_OBJ)
@- $(foreach COV_OBJ, $(COVER_OBJ), \
gcov -pbcul -o $(shell dirname $(COV_OBJ)) $(COV_OBJ) > gcov.log || cat gcov.log; \
)
endif
clean: