Skip to content

Commit

Permalink
Add coverage report for ros2_build and remove python3-boto3
Browse files Browse the repository at this point in the history
  • Loading branch information
AAlon committed Sep 3, 2019
1 parent 9c770f4 commit a5f24f0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ros2_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ set -xe
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
apt update && apt install -y python3 python3-pip lcov cmake && rosdep update
apt update && apt install -y python3-rosinstall python3-colcon-common-extensions && pip3 install -U setuptools coverage
# Manually install python3-boto3 (temporary measure until this dependency is available via rosdep).
apt install -y python3-boto3
apt update && apt install -y python3-rosinstall python3-colcon-common-extensions && pip3 install -U setuptools coverage pytest
apt list --upgradable 2>/dev/null | awk {'print $1'} | sed 's/\/.*//g' | grep $ROS_DISTRO | xargs apt install -y

REPO_NAME=$(basename -- ${TRAVIS_BUILD_DIR})
Expand Down Expand Up @@ -52,10 +50,8 @@ if [ -z "${NO_TEST}" ]; then
;;
"python")
# this doesn't actually support multiple packages
cd "/${ROS_DISTRO}_ws/build/${PACKAGE_NAMES}"
# No Python coverage support through ament/colcon yet.
# coverage xml
# cp coverage.xml /shared/coverage.info
pytest --cov=src/${REPO_NAME}/${PACKAGE_NAMES} --cov-report=xml
cp coverage.xml /shared/coverage.info
;;
esac
fi

0 comments on commit a5f24f0

Please sign in to comment.