From 9c232af8d7b0c6d29fafdb7b2ea50f3215279bbb Mon Sep 17 00:00:00 2001 From: Damon Kohler Date: Wed, 7 Dec 2016 13:12:09 +0100 Subject: [PATCH] Check test results in CI. (#216) Before this change, failing tests would not cause CI to fail. --- Dockerfile | 19 +++++++++++++------ scripts/catkin_test_results.sh | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100755 scripts/catkin_test_results.sh diff --git a/Dockerfile b/Dockerfile index f4b969a..e9d5160 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,7 @@ RUN cartographer_ros/scripts/install_debs.sh && rm -rf /var/lib/apt/lists/* # Build, install, and test all packages individually to allow caching. COPY scripts/install.sh cartographer_ros/scripts/ +COPY scripts/catkin_test_results.sh cartographer_ros/scripts/ RUN cartographer_ros/scripts/install.sh --pkg ceres-solver @@ -44,16 +45,22 @@ RUN cartographer_ros/scripts/install.sh --pkg cartographer && \ cartographer_ros/scripts/install.sh --pkg cartographer --make-args test COPY cartographer_ros_msgs catkin_ws/src/cartographer_ros/ -RUN cartographer_ros/scripts/install.sh --pkg cartographer_ros_msgs \ - --catkin-make-args run_tests +RUN cartographer_ros/scripts/install.sh --pkg cartographer_ros_msgs && \ + cartographer_ros/scripts/install.sh --pkg cartographer_ros_msgs \ + --catkin-make-args run_tests && \ + cartographer_ros/scripts/catkin_test_results.sh build_isolated/cartographer_ros_msgs COPY cartographer_ros catkin_ws/src/cartographer_ros/ -RUN cartographer_ros/scripts/install.sh --pkg cartographer_ros \ - --catkin-make-args run_tests +RUN cartographer_ros/scripts/install.sh --pkg cartographer_ros && \ + cartographer_ros/scripts/install.sh --pkg cartographer_ros \ + --catkin-make-args run_tests && \ + cartographer_ros/scripts/catkin_test_results.sh build_isolated/cartographer_ros COPY cartographer_rviz catkin_ws/src/cartographer_ros/ -RUN cartographer_ros/scripts/install.sh --pkg cartographer_rviz \ - --catkin-make-args run_tests +RUN cartographer_ros/scripts/install.sh --pkg cartographer_rviz && \ + cartographer_ros/scripts/install.sh --pkg cartographer_rviz \ + --catkin-make-args run_tests && \ + cartographer_ros/scripts/catkin_test_results.sh build_isolated/cartographer_rviz COPY scripts/ros_entrypoint.sh / # A BTRFS bug may prevent us from cleaning up these directories. diff --git a/scripts/catkin_test_results.sh b/scripts/catkin_test_results.sh new file mode 100755 index 0000000..5c7b3ea --- /dev/null +++ b/scripts/catkin_test_results.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o verbose + +. /opt/ros/${ROS_DISTRO}/setup.sh + +cd catkin_ws +catkin_test_results $@