From 186d4cc89bca441ee2ad997e1b1fcfb1a89f13a7 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sun, 27 Apr 2014 01:40:17 +0900 Subject: [PATCH 01/10] add downstream test --- .travis.yml | 58 +++---------------------------- .travis/travis.sh | 75 ++++++++++++++++++++++++++++++++++++++++ .travis_test.sh | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 54 deletions(-) create mode 100644 .travis/travis.sh create mode 100644 .travis_test.sh diff --git a/.travis.yml b/.travis.yml index 54edc2748..790c1dabf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ env: - ROS_DISTRO=groovy ROSWS=wstool BUILDER=catkin USE_DEB=false - ROS_DISTRO=hydro ROSWS=wstool BUILDER=catkin USE_DEB=true - ROS_DISTRO=hydro ROSWS=wstool BUILDER=catkin USE_DEB=false + - TEST_TYPE=work_with_downstream TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=hydro + - TEST_TYPE=work_with_315_1_10 TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=hydro notifications: email: recipients: @@ -23,57 +25,5 @@ notifications: - iisaito@opensource-robotics.tokyo.jp on_success: always #[always|never|change] # default: change on_failure: always #[always|never|change] # default: always -before_install: # Use this to prepare the system to install prerequisites or dependencies - # Define some config vars - - export CI_SOURCE_PATH=$(pwd) - - export REPOSITORY_NAME=${PWD##*/} - - echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME" - - sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' - - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - - sudo apt-get update -qq - - sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin - - if [ $ROSWS == rosws ]; then sudo apt-get install -qq -y python-rosinstall ; fi - - if [ $BUILDER == rosbuild ]; then sudo apt-get install -qq -y ros-$ROS_DISTRO-rosmake ; fi - # Setup rosdep - - sudo rosdep init - - rosdep update; while [ $? != 0 ]; do sleep 1; rosdep update; done -install: # Use this to install any prerequisites or dependencies necessary to run your build - # Create workspace - - mkdir -p ~/ros/ws_$REPOSITORY_NAME/src - - cd ~/ros/ws_$REPOSITORY_NAME/src - - if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then $ROSWS init . ; fi - - if [ $USE_DEB == false ]; then $ROSWS merge http://raw.github.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.rosinstall ; fi - - if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then if [ $ROSWS == rosws ]; then $ROSWS merge /opt/ros/$ROS_DISTRO/.rosinstall; fi ; fi - - if [ $USE_DEB == false ]; then sed -i "s@^\(.*github.com/$TRAVIS_REPO_SLUG.*\)@#\1@" .rosinstall ; fi # comment out current repo - - if [ $USE_DEB == false ]; then $ROSWS update ; fi - - if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then $ROSWS set $REPOSITORY_NAME http://github.com/$TRAVIS_REPO_SLUG --git -y ; fi - - ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace - - cd ../ - # Install dependencies for source repos - - find -L src -name package.xml -exec dirname {} \; | xargs -n 1 -i find {} -name manifest.xml | xargs -n 1 -i mv {} {}.deprecated # rename manifest.xml for rosdep install - - rosdep install -r -n --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y - - find -L src -name manifest.xml.deprecated | xargs -n 1 -i dirname {} | xargs -n 1 -i ln -sf `pwd`/{}/manifest.xml.deprecated `pwd`/{}/manifest.xml # rename manifest.xml for rosdep install - - find . \! -path "*/.*" -type f | xargs egrep -i "(hoge|fuga)" ; if [ $? == 0 ]; then exit 1; fi -before_script: # Use this to prepare your build for testing e.g. copy database configurations, environment variables, etc. - - source /opt/ros/$ROS_DISTRO/setup.bash - - if [ $BUILDER == rosbuild ]; then source src/setup.bash ; fi - - if [ $BUILDER == rosbuild ]; then rospack profile ; fi -script: # All commands must exit with code 0 on success. Anything else is considered failure. - # for catkin - - if [ $BUILDER == catkin ]; then catkin_make -j8 -l8 ; fi - - if [ $BUILDER == catkin ]; then export TARGET_PKG=`find build/$REPOSITORY_NAME -name Makefile -print | sed s@.*/\\\\\([^\/]*\\\\\)/Makefile@\\\1@g` ; fi - - if [ $BUILDER == catkin ]; then catkin_make test --pkg $TARGET_PKG -j8 -l8 ; fi - - if [ $BUILDER == catkin ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi - - if [ $BUILDER == catkin ]; then catkin_make -j8 -l8 install ; fi - - if [ $BUILDER == catkin ]; then rm -fr devel src build ; fi - - if [ $BUILDER == catkin ]; then source install/setup.bash ; fi - - if [ $BUILDER == catkin ]; then export EXIT_STATUS=0; for pkg in $TARGET_PKG; do [ "`find install/share/$pkg -iname '*.test'`" == "" ] && echo "[$pkg] No tests ware found!!!" || find install/share/$pkg -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; done; [ $EXIT_STATUS == 0 ] ; fi - # for rosbuild - - if [ $BUILDER == rosbuild ]; then rosmake -a --profile --pjobs=8 ; fi - - if [ $BUILDER == rosbuild ]; then export TARGET_PKG=`find -L src | grep $REPOSITORY_NAME | grep /build/Makefile$ | sed s@.*/\\\\\([^\/]*\\\\\)/build/Makefile@\\\1@g` ; fi - - if [ $BUILDER == rosbuild ]; then rosmake --test-only $TARGET_PKG --pjobs=8 ; fi -after_failure: - - if [ $BUILDER == rosbuild ]; then find ${HOME}/.ros/rosmake/ -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi - - find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; - - for file in ${HOME}/.ros/log/rostest-*; do echo "=== $file ==="; cat $file; done - +script: + - if [ "${TEST_TYPE}" == "" ] ; then source .travis/travis.sh; else source ./.travis_test.sh ; fi diff --git a/.travis/travis.sh b/.travis/travis.sh new file mode 100644 index 000000000..e64de3dc5 --- /dev/null +++ b/.travis/travis.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +set -x + +if [ $ROS_DISTRO == "indigo" -a "$TRAVIS_JOB_ID" ]; then + sudo apt-get install -qq -y python-jenkins + ./.travis/travis_jenkins.py + exit $? +fi + +function error { + if [ $BUILDER == rosbuild -a -e ${HOME}/.ros/rosmake/ ]; then find ${HOME}/.ros/rosmake/ -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + for file in ${HOME}/.ros/log/rostest-*; do echo "=== $file ==="; cat $file; done + exit 1 +} + +trap error ERR + +### before_install: # Use this to prepare the system to install prerequisites or dependencies +# Define some config vars +export CI_SOURCE_PATH=$(pwd) +export REPOSITORY_NAME=${PWD##*/} +if [ ! "$ROS_PARALLEL_JOBS" ]; then export ROS_PARALLEL_JOBS="-j8 -l8"; fi +echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME" +sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' +wget http://packages.ros.org/ros.key -O - | sudo apt-key add - +sudo apt-get update -qq +sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-rosbash +if [ $ROSWS == rosws ]; then sudo apt-get install -qq -y python-rosinstall ; fi +if [ $BUILDER == rosbuild ]; then sudo apt-get install -qq -y ros-$ROS_DISTRO-rosmake ; fi +# MongoDB hack - I don't fully understand this but its for moveit_warehouse +sudo apt-get remove -y -qq mongodb mongodb-10gen || echo "ok" +sudo apt-get install -y -qq mongodb-clients mongodb-server -o Dpkg::Options::="--force-confdef" || ecoh "ok" # default actions +# Setup rosdep +sudo rosdep init +rosdep update; while [ $? != 0 ]; do sleep 1; rosdep update; done + +### install: # Use this to install any prerequisites or dependencies necessary to run your build +# Create workspace +mkdir -p ~/ros/ws_$REPOSITORY_NAME/src +cd ~/ros/ws_$REPOSITORY_NAME/src +if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then $ROSWS init . ; fi +if [ $USE_DEB == false ]; then $ROSWS merge file://$CI_SOURCE_PATH/.rosinstall ; fi +if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then if [ $ROSWS == rosws ]; then $ROSWS merge /opt/ros/$ROS_DISTRO/.rosinstall; fi ; fi +if [ $USE_DEB == false ]; then sed -i "s@^\(.*github.com/$TRAVIS_REPO_SLUG.*\)@#\1@" .rosinstall ; fi # comment out current repo +if [ $USE_DEB == false ]; then $ROSWS update ; fi +if [ $USE_DEB == false -o $BUILDER == rosbuild ]; then $ROSWS set $REPOSITORY_NAME http://github.com/$TRAVIS_REPO_SLUG --git -y ; fi +ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace +cd ../ +# Install dependencies for source repos +find -L src -name package.xml -exec dirname {} \; | xargs -n 1 -i find {} -name manifest.xml | xargs -n 1 -i mv {} {}.deprecated # rename manifest.xml for rosdep install +rosdep install -r -n --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y +find -L src -name manifest.xml.deprecated | xargs -n 1 -i dirname {} | xargs -n 1 -i ln -sf `pwd`/{}/manifest.xml.deprecated `pwd`/{}/manifest.xml # rename manifest.xml for rosdep install + +### before_script: # Use this to prepare your build for testing e.g. copy database configurations, environment variables, etc. +source /opt/ros/$ROS_DISTRO/setup.bash +if [ $BUILDER == rosbuild ]; then source src/setup.bash ; fi +if [ $BUILDER == rosbuild ]; then rospack profile ; fi + +### script: # All commands must exit with code 0 on success. Anything else is considered failure. +# for catkin +if [ $BUILDER == catkin ]; then catkin_make $ROS_PARALLEL_JOBS ; fi +if [ $BUILDER == catkin ]; then export TARGET_PKG=`find build/$REPOSITORY_NAME -name Makefile -print | sed s@.*/\\\\\([^\/]*\\\\\)/Makefile@\\\1@g` ; fi +if [ $BUILDER == catkin ]; then catkin_make test --pkg $TARGET_PKG $ROS_PARALLEL_JOBS ; fi +if [ $BUILDER == catkin ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi +if [ $BUILDER == catkin ]; then catkin_make $ROS_PARALLEL_JOBS install ; fi +if [ $BUILDER == catkin ]; then rm -fr devel src build ; fi +if [ $BUILDER == catkin ]; then source install/setup.bash ; fi +if [ $BUILDER == catkin ]; then export EXIT_STATUS=0; for pkg in $TARGET_PKG; do [ "`find install/share/$pkg -iname '*.test'`" == "" ] && echo "[$pkg] No tests ware found!!!" || find install/share/$pkg -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; done; [ $EXIT_STATUS == 0 ] ; fi +# for rosbuild +if [ $BUILDER == rosbuild ]; then rosmake -a --profile ; fi +if [ $BUILDER == rosbuild ]; then export TARGET_PKG=`find -L src | grep $REPOSITORY_NAME | grep /build/Makefile$ | sed s@.*/\\\\\([^\/]*\\\\\)/build/Makefile@\\\1@g` ; fi +if [ $BUILDER == rosbuild ]; then rosmake --test-only $TARGET_PKG ; fi + diff --git a/.travis_test.sh b/.travis_test.sh new file mode 100644 index 000000000..57b516cdc --- /dev/null +++ b/.travis_test.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +set -x + +function error { + if [ $BUILDER == rosbuild -a -e ${HOME}/.ros/rosmake/ ]; then find ${HOME}/.ros/rosmake/ -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + for file in ${HOME}/.ros/log/rostest-*; do echo "=== $file ==="; cat $file; done + exit 1 +} + +trap error ERR + +### before_install: # Use this to prepare the system to install prerequisites or dependencies +# Define some config vars +export CI_SOURCE_PATH=$(pwd) +export REPOSITORY_NAME=${PWD##*/} +if [ ! "$ROS_PARALLEL_JOBS" ]; then export ROS_PARALLEL_JOBS="-j8 -l8"; fi +echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME" +sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' +wget http://packages.ros.org/ros.key -O - | sudo apt-key add - +sudo apt-get update -qq +sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-rosbash + +### +pkg=$TEST_PACKAGE +sudo apt-get install -y ros-hydro-$pkg + +# this is hotfix +sudo wget https://raw.githubusercontent.com/start-jsk/rtmros_common/master/hrpsys_tools/test/test-pa10.test -O /opt/ros/hydro/share/hrpsys_tools/test/test-pa10.test + +# +source /opt/ros/hydro/setup.bash + +# set hrpsys (hrpsys wrapper for ROS, just for compile and test) +mkdir -p ~/catkin_ws/src +cd ~/catkin_ws +ln -sf ${CI_SOURCE_PATH} src/ + +if [ "$TEST_TYPE" == "work_with_downstream" ]; then + echo " + # + # check newer version of hrpsys works on current rtmros_common deb package + # [rtmros_common:new] <-> [rtmros_:old] + " + sudo dpkg -r --force-depends ros-hydro-hrpsys-ros-bridge + sudo dpkg -r --force-depends ros-hydro-hrpsys-tools + sudo dpkg -r --force-depends ros-hydro-rtmbuild + catkin_make -j8 -l8 + catkin_make install -j8 -l8 +else + echo " + # + # check rtmros_ compiled on newer version of rtmros_common works with deb version of rtmros_common + # [rtmros_common:old] <-> [rtmros_:new] + [rtmros_common:new] + " + # set up sorce code of downstream package + cd src + wstool set rtmros_common http://github.com/start-jsk/rtmros_common --git -y + wstool set rtmros_hironx http://github.com/start-jsk/rtmros_hironx --git -y + wstool set rtmros_nextage http://github.com/tork-a/rtmros_nextage --git -y + wstool update + cd .. + # do not install rtmros_common because we want to use them + for _pkg in hrpsys_ros_bridge, hrpsys_tools, rtmbuild; do + sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt + sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/CMakeLists.txt + sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/catkin.cmake + done + catkin_make -j8 -l8 --only-pkg-with-deps `echo $pkg | sed s/-/_/g` + catkin_make install -j8 -l8 + +fi + +rospack profile +source install/setup.bash + +export EXIT_STATUS=0; +pkg_path=`rospack find \`echo $pkg | sed s/-/_/g\`` +if [ "`find $pkg_path/test -iname '*.test'`" == "" ]; then + echo "[$pkg] No tests ware found!!!" +else + find $pkg_path/test -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; +fi + +[ $EXIT_STATUS == 0 ] || exit 1 + From 409961a8e214a4ce182e3fffd61b2bd33f0267c9 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 00:14:20 +0900 Subject: [PATCH 02/10] fix .travis_test script --- .travis_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis_test.sh b/.travis_test.sh index 57b516cdc..917e90dd5 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -3,7 +3,7 @@ set -x function error { - if [ $BUILDER == rosbuild -a -e ${HOME}/.ros/rosmake/ ]; then find ${HOME}/.ros/rosmake/ -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + if [ -e ${HOME}/.ros/rosmake/ ]; then find ${HOME}/.ros/rosmake/ -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi for file in ${HOME}/.ros/log/rostest-*; do echo "=== $file ==="; cat $file; done exit 1 @@ -56,6 +56,7 @@ else " # set up sorce code of downstream package cd src + wstool init wstool set rtmros_common http://github.com/start-jsk/rtmros_common --git -y wstool set rtmros_hironx http://github.com/start-jsk/rtmros_hironx --git -y wstool set rtmros_nextage http://github.com/tork-a/rtmros_nextage --git -y From 941df44b77558f69aa1942b221f291e35c02da84 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 00:57:29 +0900 Subject: [PATCH 03/10] fix downstream test --- .travis_test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis_test.sh b/.travis_test.sh index 917e90dd5..31220c0a1 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -57,7 +57,6 @@ else # set up sorce code of downstream package cd src wstool init - wstool set rtmros_common http://github.com/start-jsk/rtmros_common --git -y wstool set rtmros_hironx http://github.com/start-jsk/rtmros_hironx --git -y wstool set rtmros_nextage http://github.com/tork-a/rtmros_nextage --git -y wstool update From 7eca4014ce4e3d781944dac8486d625cc1ba7399 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 10:00:34 +0900 Subject: [PATCH 04/10] (debug): add find ? --- .travis_test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis_test.sh b/.travis_test.sh index 31220c0a1..9a81a758d 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -35,7 +35,7 @@ source /opt/ros/hydro/setup.bash # set hrpsys (hrpsys wrapper for ROS, just for compile and test) mkdir -p ~/catkin_ws/src cd ~/catkin_ws -ln -sf ${CI_SOURCE_PATH} src/ +ln -sf ${CI_SOURCE_PATH} src/rtmros_common if [ "$TEST_TYPE" == "work_with_downstream" ]; then echo " @@ -62,7 +62,8 @@ else wstool update cd .. # do not install rtmros_common because we want to use them - for _pkg in hrpsys_ros_bridge, hrpsys_tools, rtmbuild; do + find src + for _pkg in hrpsys_ros_bridge hrpsys_tools rtmbuild; do sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/CMakeLists.txt sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/catkin.cmake From 3d5531d9b358aa7db33ea923cb0392196784db78 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 14:35:07 +0900 Subject: [PATCH 05/10] fix? --- .travis_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis_test.sh b/.travis_test.sh index 9a81a758d..9eeb64407 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -65,8 +65,8 @@ else find src for _pkg in hrpsys_ros_bridge hrpsys_tools rtmbuild; do sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install\(@dummy_install\(@f" src/rtmros_common/${_pkg}/catkin.cmake + sed -i "s@install\(@dummy_install\(@g" src/rtmros_common/${_pkg}/CMakeLists.txt + sed -i "s@install\(@dummy_install\(@g" src/rtmros_common/${_pkg}/catkin.cmake done catkin_make -j8 -l8 --only-pkg-with-deps `echo $pkg | sed s/-/_/g` catkin_make install -j8 -l8 From b6d7b21952538a9b13f8b0f853261a93e6401699 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 16:20:15 +0900 Subject: [PATCH 06/10] fix sed --- .travis_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis_test.sh b/.travis_test.sh index 9eeb64407..0da8b6240 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -65,8 +65,8 @@ else find src for _pkg in hrpsys_ros_bridge hrpsys_tools rtmbuild; do sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install\(@dummy_install\(@g" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install\(@dummy_install\(@g" src/rtmros_common/${_pkg}/catkin.cmake + sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/CMakeLists.txt + sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/catkin.cmake done catkin_make -j8 -l8 --only-pkg-with-deps `echo $pkg | sed s/-/_/g` catkin_make install -j8 -l8 From 300c655b76c60a24715dcd3b513f21d22febe832 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 17:13:06 +0900 Subject: [PATCH 07/10] fix sed --- .travis_test.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis_test.sh b/.travis_test.sh index 0da8b6240..60101dc7b 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -64,9 +64,13 @@ else # do not install rtmros_common because we want to use them find src for _pkg in hrpsys_ros_bridge hrpsys_tools rtmbuild; do - sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/CMakeLists.txt - sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/catkin.cmake + if [ -e src/rtmros_common/${_pkg}/CMakeLists.txt ] ; then + sed -i "1imacro(dummy_install)\nmessage(\"install(\${ARGN})\")\nendmacro()" src/rtmros_common/${_pkg}/CMakeLists.txt + sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/CMakeLists.txt + fi + if [ -e src/rtmros_common/${_pkg}/catkin.cmake ] ; then + sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/catkin.cmake + fi done catkin_make -j8 -l8 --only-pkg-with-deps `echo $pkg | sed s/-/_/g` catkin_make install -j8 -l8 From fe510b74af65a731b80f7722c544a9be86532cf7 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 18:47:11 +0900 Subject: [PATCH 08/10] install rqt-robot-dashboard --- .travis_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis_test.sh b/.travis_test.sh index 60101dc7b..e3c1f5ad4 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -29,6 +29,8 @@ sudo apt-get install -y ros-hydro-$pkg # this is hotfix sudo wget https://raw.githubusercontent.com/start-jsk/rtmros_common/master/hrpsys_tools/test/test-pa10.test -O /opt/ros/hydro/share/hrpsys_tools/test/test-pa10.test +sudo apt-get install -y -qq ros-hydro-rqt-robot-dashboard + # source /opt/ros/hydro/setup.bash From b832400e26558f679a299947f8ba4962f3f8774d Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 18:52:34 +0900 Subject: [PATCH 09/10] add error message when filed --- .travis_test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis_test.sh b/.travis_test.sh index e3c1f5ad4..694101d26 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -90,5 +90,11 @@ else find $pkg_path/test -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; fi -[ $EXIT_STATUS == 0 ] || exit 1 +if [ $EXIT_STATUS == 0 ] ; then + exit 0 +else + if [ $BUILDER == catkin ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi + if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi + exit 1 +fi From 080cee20727ec5b9fa1cf81fa6c57692f292f631 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 28 Apr 2014 20:05:31 +0900 Subject: [PATCH 10/10] display test log --- .travis_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis_test.sh b/.travis_test.sh index 694101d26..33ca65694 100644 --- a/.travis_test.sh +++ b/.travis_test.sh @@ -90,11 +90,11 @@ else find $pkg_path/test -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?; fi +if [ -e build ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi +if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi if [ $EXIT_STATUS == 0 ] ; then exit 0 else - if [ $BUILDER == catkin ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi - if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi exit 1 fi