Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test codes #53

Merged
merged 4 commits into from
Mar 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion Makefile.hrpsys-base
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SVN_URL = https://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)

Expand Down
7 changes: 7 additions & 0 deletions test/test-jointangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down