Files
aliyun-openapi-cpp-sdk/test-coverage.sh
2019-01-09 14:07:33 +08:00

25 lines
466 B
Bash
Executable File

#!/bin/bash
action=$1
if [ $action == "init" ]; then
echo 'init coverage'
lcov -d sdk_build -z
lcov -d sdk_build -b . --no-external --initial -c -o initCoverage.info
fi
echo 'run test'
cd sdk_build
ctest
cd ..
echo 'create info after test'
lcov -d sdk_build -b . --no-external -c -o testCoverage.info
echo 'generate html'
genhtml -o coverageReport --prefix=`pwd` initCoverage.info testCoverage.info
echo 'check report ' `pwd`/coverageReport/index.html