Skip to content

Commit

Permalink
updated testing
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Dec 6, 2023
1 parent 7bfb3f7 commit 669319c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions test/all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR

PACKAGE_NAME=mrs_uav_autostart

ORIGINAL_PATH=`pwd`

while [ ! -e ".catkin_tools" ]; do
Expand Down
6 changes: 3 additions & 3 deletions test/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

PACKAGE_NAME=mrs_uav_autostart

while [ ! -e ".catkin_tools" ]; do
cd ..
if [[ `pwd` == "/" ]]; then
Expand All @@ -11,11 +9,13 @@ while [ ! -e ".catkin_tools" ]; do
fi
done

WORKSPACE_NAME=${PWD##*/}

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
lcov --extract coverage.info.removed "*/${WORKSPACE_NAME}/src/*" --output-file coverage.info.cleaned
genhtml -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 669319c

Please sign in to comment.