diff --git a/test/coverage.sh b/test/coverage.sh index f8f1cc7..0c2f9c0 100755 --- a/test/coverage.sh +++ b/test/coverage.sh @@ -2,9 +2,6 @@ PACKAGE_NAME=mrs_uav_controllers -# find the build folder of the current workspace -roscd $PACKAGE_NAME - while [ ! -e ".catkin_tools" ]; do cd .. if [[ `pwd` == "/" ]]; then @@ -18,8 +15,8 @@ cd build lcov --capture --directory . --output-file coverage.info lcov --remove coverage.info "*/test/*" --output-file coverage.info.removed -lcov --extract coverage.info.removed "*/${PACKAGE_NAME}/*" --output-file coverage.info.cleaned -genhtml -o coverage_html coverage.info.cleaned | tee /tmp/genhtml.log +lcov --extract coverage.info.removed "*/src/*${PACKAGE_NAME}/*" --output-file coverage.info.cleaned +genhtml --title "${PACKAGE_NAME} - Test coverage report" --demangle-cpp --legend --frames --show-details -o coverage_html coverage.info.cleaned | tee /tmp/genhtml.log COVERAGE_PCT=`cat /tmp/genhtml.log | tail -n 1 | awk '{print $2}'`