summaryrefslogtreecommitdiff
path: root/buildbot/run-coverage-helper.sh
blob: 7448514f6e356072af8880b03fa3ab3470d0bda6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# This file is in the public domain
#
# Helper script for coverage.sh

set -eu

ORIG=`pwd`

for codebase in exchange merchant sync anastasis; do
  TOP="$HOME/sources/${codebase}/"
  REPORT_DIR="$HOME/sources/${codebase}/coverage_report"
  lcov --no-external --initial -d $TOP -z
  cd $TOP
  make check -k || true
  mkdir -p $REPORT_DIR
  lcov -d $TOP -c --no-external -o $REPORT_DIR/coverage.info
  lcov -r $REPORT_DIR/coverage.info **/test_* -o $REPORT_DIR/rcoverage.info
  genhtml --legend --title "GNU Taler $codebase coverage report" -o $REPORT_DIR $REPORT_DIR/rcoverage.info
  chmod a+rx -R $REPORT_DIR
done

cd $ORIG