Commit 944139e59494783b521d3d5a25efa266fa4ddf60

Martin Mitas 2017-08-13T10:57:12

Create code coverage report by lcov.

diff --git a/.travis.yml b/.travis.yml
index 2d71589..8a56756 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,11 @@ language: c
 compiler:
     - gcc
 
+addons:
+    apt:
+        packages:
+            - lcov
+
 before_script:
     - mkdir build
     - cd build
@@ -16,4 +21,10 @@ script:
 
 after_success:
     - ../scripts/run-tests.sh
-    - bash <(curl -s https://codecov.io/bash)
+    # Creating report
+    - cd ${TRAVIS_BUILD_DIR}
+    - lcov --directory . --capture --output-file coverage.info # capture coverage info
+    - lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
+    - lcov --list coverage.info # debug info
+    # Uploading report to CodeCov
+    - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"