Skip to content

Commit

Permalink
updated coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Nov 30, 2023
1 parent 3e4bae3 commit 250310f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}'`

Expand Down

0 comments on commit 250310f

Please sign in to comment.