Skip to content

Commit

Permalink
Fix #253 #254: Pipe failed return status on grepping (#255)
Browse files Browse the repository at this point in the history
* Fix #254: Pipe failed return status on grepping

Closes #254

* catkin 0.3.1 fails without tailing -- (#3)
  • Loading branch information
wkentaro authored and k-okada committed May 1, 2016
1 parent 9f32ee8 commit c9d8466
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ source /opt/ros/$ROS_DISTRO/setup.bash > /tmp/$$.x 2>&1; grep export\ [^_] /tmp/
# for catkin
if [ "${TARGET_PKGS// }" == "" ]; then export TARGET_PKGS=`catkin_topological_order ${CI_SOURCE_PATH} --only-names`; fi
if [ "${TEST_PKGS// }" == "" ]; then export TEST_PKGS=$( [ "${BUILD_PKGS// }" == "" ] && echo "$TARGET_PKGS" || echo "$BUILD_PKGS"); fi
if [ "$BUILDER" == catkin ]; then catkin build -i --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS | grep -v -e Symlinking -e Linked ; fi
if [ "$BUILDER" == catkin ]; then
set -o pipefail # this is necessary to pipe fail status on grepping
catkin build -i --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS | grep -v -e Symlinking -e Linked
set +o pipefail
fi

travis_time_end
travis_time_start catkin_run_tests
Expand All @@ -198,7 +202,9 @@ fi

if [ "$BUILDER" == catkin ]; then
source devel/setup.bash > /tmp/$$.x 2>&1; grep export\ [^_] /tmp/$$.x ; rospack profile # force to update ROS_PACKAGE_PATH for rostest
catkin run_tests -i --no-deps --no-status $TEST_PKGS $CATKIN_PARALLEL_TEST_JOBS --make-args $ROS_PARALLEL_TEST_JOBS | grep -v -e Symlinking -e Linked -e :[^\s]*install[^\s]*\]
set -o pipefail # this is necessary to pipe fail status on grepping
catkin run_tests -i --no-deps --no-status $TEST_PKGS $CATKIN_PARALLEL_TEST_JOBS --make-args $ROS_PARALLEL_TEST_JOBS -- | grep -v -e Symlinking -e Linked -e :[^\s]*install[^\s]*\]
set +o pipefail
catkin_test_results build || error
fi

Expand All @@ -211,7 +217,9 @@ if [ "$NOT_TEST_INSTALL" != "true" ]; then
if [ "$BUILDER" == catkin ]; then
catkin clean --yes || catkin clean -a # 0.3.1 uses -a, 0.4.0 uses --yes
catkin config --install
set -o pipefail # this is necessary to pipe fail status on grepping
catkin build --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS | grep -v -e Symlinking -e Linked -e :[^\s]*install[^\s]*\]
set +o pipefail
source install/setup.bash > /tmp/$$.x 2>&1; grep export\ [^_] /tmp/$$.x
rospack profile
rospack plugins --attrib=plugin nodelet || echo "ok"
Expand Down

0 comments on commit c9d8466

Please sign in to comment.