File: coverage.sh

package info (click to toggle)
libambix 0.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,756 kB
  • sloc: ansic: 9,900; makefile: 418; sh: 170; python: 92
file content (22 lines) | stat: -rwxr-xr-x 733 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

## this assumes that libambix has been compiled with gcov support (--coverage)

INFOFILE="libambix.info"
OUTDIR=coverage/

MAKE=make

# Generate html report

lcov --base-directory . --directory . --zerocounters -q || exit 1
${MAKE} check || exit 1
lcov --base-directory libambix/src --directory libambix/src -c -o ${INFOFILE} || exit 1
lcov --base-directory libambix/tests --directory libambix/tests -c -o tests_${INFOFILE} || exit 1

# remove output for external libraries
lcov --remove ${INFOFILE} "/usr*" -o ${INFOFILE}  || exit 1
lcov --remove tests_${INFOFILE} "/usr*" -o tests_${INFOFILE}  || exit 1

rm -rf "${OUTDIR}"
genhtml -o "${OUTDIR}" -t "libambix test coverage" --num-spaces 4 ${INFOFILE} tests_${INFOFILE}