Debian Codegraph @

script/codecov.sh.in

raw
1 #!/bin/bash
2
3 lcov --directory . --capture --output-file coverage.info
4 # filter out system and extra files.
5 # To also not include test code in coverage add them with full path to the patterns: '*/tests/*'
6 lcov --remove coverage.info '/usr/*' "@G2O_SRC_DIR@/g2o/EXTERNAL/*" "@G2O_SRC_DIR@/unit_test/*" --output-file coverage.info
7 # output coverage data for debugging (optional)
8 #lcov --list coverage.info
9 # Uploading to CodeCov
10 # '-f' specifies file(s) to use and disables manual coverage gathering and file search which has already been done above
11 bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"