File: 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 (20 lines) | stat: -rwxr-xr-x 534 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

make -j8 && make test

if [ "x$?" = "x0" ]; then 

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

    # remove system library files 
    lcov --remove mia.info "/usr*" -o mia.info
    lcov --remove mia.info "mia2/src*" -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
    rm -rf test-coverage

    genhtml -o test-coverage -t "Mia coverage" --num-spaces 2 mia.info
else
    echo build or test failed 
fi