File: evaluate_coverage.sh

package info (click to toggle)
mia 2.4.3-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,964 kB
  • ctags: 18,491
  • sloc: cpp: 153,197; python: 1,254; sh: 311; xml: 127; makefile: 27; csh: 24; ansic: 9
file content (28 lines) | stat: -rw-r--r-- 677 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh 

mkdir build-coverage
cd build-coverage

cmake -DALWAYS_CREATE_DOC=OFF -DSTRICT_DEPENDECIES=ON \
      -DMIA_CREATE_MANPAGES=OFF -DMIA_CREATE_NIPYPE_INTERFACES=OFF \
      -DENABLE_COVERAGE=ON -DDISABLE_PROGRAMS=ON -DUSE_MATHJAX=YES \
      -G Ninja ..

ninja

lcov --base-directory . --directory . --zerocounters -q

ninja test

lcov --base-directory . --directory . -c -o mia.info

# remove system library files 
lcov --remove mia.info "/usr*" -o mia.info

# generate the html report, note that genhtml may have some problems with a few files
# that will currently need to be removed manually
genhtml -o test-coverage -t "Mia coverage" --num-spaces 2 mia.info