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
|