aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/ci/after_success.sh
blob: 5cd01b39a0b3c5d8d2d0e0cf6a6ea10400390db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -ev
which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available

if [ "$BUILD_MODE" = "coverage" ]; then
   GCOV="/usr/bin/gcov-4.8"
   /tmp/usr/bin/lcov --gcov-tool "$GCOV" --directory . --capture --output-file coverage.info
   /tmp/usr/bin/lcov --gcov-tool "$GCOV" --remove coverage.info 'tests/*' '/usr/*' --output-file coverage.info
   /tmp/usr/bin/lcov --gcov-tool "$GCOV" --list coverage.info

   # Assume that $COVERALLS_REPO_TOKEN might not be set (e.g. pull requests)
   coveralls-lcov --repo-token="$COVERALLS_REPO_TOKEN" coverage.info
fi