2013-08-18 11:22:36 -07:00
|
|
|
#!/bin/bash
|
2013-08-19 20:41:54 -07:00
|
|
|
CXX=$1
|
|
|
|
GCOV_TOOL=$2
|
|
|
|
LCOV=~/bin/lcov
|
|
|
|
GENHTML=~/bin/genhtml
|
2013-08-18 11:22:36 -07:00
|
|
|
|
|
|
|
rm -rf build
|
|
|
|
mkdir -p build/testcov
|
|
|
|
cd build/testcov
|
2015-03-28 23:29:52 -04:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=TESTCOV -DCMAKE_CXX_COMPILER="$CXX" ../../src
|
2013-08-19 20:41:54 -07:00
|
|
|
make
|
2013-08-18 11:22:36 -07:00
|
|
|
ctest
|
2015-03-28 23:29:52 -04:00
|
|
|
"$LCOV" -c -b ../../src -d . -o cov.info --no-external --gcov-tool "$GCOV_TOOL"
|
|
|
|
"$LCOV" --remove cov.info "tests/*" -o cov.info
|
|
|
|
"$GENHTML" cov.info --output-directory lcov
|
2013-08-18 11:22:36 -07:00
|
|
|
cd ../../
|