Check test results in CI. (#216)

Before this change, failing tests would not cause CI to fail.
master
Damon Kohler 2016-12-07 13:12:09 +01:00 committed by GitHub
parent 2803b7bb49
commit 9c232af8d7
2 changed files with 36 additions and 6 deletions

View File

@ -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.

23
scripts/catkin_test_results.sh Executable file
View File

@ -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 $@