diff --git a/.travis.yml b/.travis.yml index 6f53a8a33..85bf0c4c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,6 +70,10 @@ before_cache: after_failure: - tests/travis/travis_after_failure.sh +after_success: + - tree build + - bash <(curl -s https://codecov.io/bash) -a '-o src/ src/*.c' + notifications: email: on_success: change diff --git a/Makefile b/Makefile index 3650c6058..1560cc87e 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh index 2d3713064..2c8a14194 100755 --- a/tests/travis/run_test.sh +++ b/tests/travis/run_test.sh @@ -94,5 +94,5 @@ if [ ${TASK} == "cpp_test" ]; then make -f dmlc-core/scripts/packages.mk gtest echo "TEST_COVER=1" >> config.mk echo "GTEST_PATH="${CACHE_PREFIX} >> config.mk - make check + make cover fi