diff --git a/.travis.yml b/.travis.yml index eca73d2b..27ff7ba6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ script: # All commands must exit with code 0 on success. Anything else is consid # 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 ; fi + - if [ $BUILDER == rosbuild ]; then PKG_CONFIG_PATH=`rospack find openhrp3`/lib/pkgconfig:`rospack find hrpsys`/lib/pkgconfig:$PKG_CONFIG_PATH rosmake --test-only $TARGET_PKG ; fi after_failure: - find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; - for file in ${HOME}/.ros/log/rostest-*; do echo "=== $file ==="; cat $file; done diff --git a/CMakeLists.txt b/CMakeLists.txt index fff13014..815ac675 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,3 +11,10 @@ execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.hr if (_make_failed) message(FATAL_ERROR "Build of hrpsys failed") endif(_make_failed) + +rosbuild_init() + +rosbuild_add_rostest(test/test-hrpsys.test) +rosbuild_add_rostest(test/test-colcheck.test) +rosbuild_add_rostest(test/test-pa10.test) +rosbuild_add_rostest(test/test-simulator.test) diff --git a/Makefile.hrpsys-base b/Makefile.hrpsys-base index a010d22a..ad2d4a58 100644 --- a/Makefile.hrpsys-base +++ b/Makefile.hrpsys-base @@ -7,7 +7,7 @@ SVN_URL = http://hrpsys-base.googlecode.com/svn/tags/315.1.9 #SVN_REVISION=-r@REVISION@ OPENRTM_DIR ?= $(shell rospack find openrtm_aist) -PKG_CONFIG_PATH ?= $(shell rospack find openrtm_aist)/lib/pkgconfig:$(shell rospack find openhrp3)/lib/pkgconfig:$(PKG_CONFIG_PATH) +PKG_CONFIG_PATH := $(shell rospack find openrtm_aist)/lib/pkgconfig:$(shell rospack find openhrp3)/lib/pkgconfig:$(PKG_CONFIG_PATH) MK_DIR = $(shell rospack find mk) NUM_OF_CPUS = $(shell grep -c '^processor' /proc/cpuinfo) diff --git a/test/test-jointangle.py b/test/test-jointangle.py index a8369ff1..4bfd171b 100755 --- a/test/test-jointangle.py +++ b/test/test-jointangle.py @@ -3,6 +3,13 @@ PKG = 'hrpsys' NAME = 'test-hostname' +import imp ## for rosbuild +try: + imp.find_module(PKG) +except: + import roslib; roslib.load_manifest(PKG) + + import os import sys import time