From 979741d9e932b2b405f23f0b8e9c731f9108745a Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 3 Mar 2014 12:47:51 +0900 Subject: [PATCH 1/2] add test to check import waitInput works, see https://github.com/start-jsk/hrpsys/commit/953c69c862108d82af8678d97928c7eccd868747 --- test/test-hrpsys.test | 1 + test/test-hrpsysconf.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 test/test-hrpsysconf.py diff --git a/test/test-hrpsys.test b/test/test-hrpsys.test index 24afa7a6..a46549a7 100644 --- a/test/test-hrpsys.test +++ b/test/test-hrpsys.test @@ -19,4 +19,5 @@ + \ No newline at end of file diff --git a/test/test-hrpsysconf.py b/test/test-hrpsysconf.py new file mode 100755 index 00000000..d9731f8a --- /dev/null +++ b/test/test-hrpsysconf.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +PKG = 'hrpsys' +NAME = 'test-waitinput' + +import roslib; roslib.load_manifest('hrpsys') +from hrpsys import hrpsys_config + +import unittest, sys + +class TestHrpsysConfig(unittest.TestCase): + + def test_import_waitinput(self): + # https://github.com/start-jsk/rtmros_hironx/blob/groovy-devel/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py + from waitInput import waitInputConfirm, waitInputSelect + self.assertTrue(True) + +if __name__ == '__main__': + import rostest + rostest.run(PKG, NAME, TestHrpsysConfig, sys.argv) From 525669cd4df3546dfee3227247346e8544e6aad4 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Mon, 3 Mar 2014 14:05:44 +0900 Subject: [PATCH 2/2] add test-simulator.test, use h.init(robotname=) to specify PA10 controller, fix to avoid https://github.com/start-jsk/hrpsys/commit/7e78dbcea4aa0bd73e46dcb1e3af49d5179f97bd --- catkin.cmake | 1 + test/test-jointangle.py | 2 +- test/test-simulator.test | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/test-simulator.test diff --git a/catkin.cmake b/catkin.cmake index 60a608d1..5673bb76 100644 --- a/catkin.cmake +++ b/catkin.cmake @@ -185,4 +185,5 @@ install(CODE add_rostest(test/test-hrpsys.test) add_rostest(test/test-colcheck.test) add_rostest(test/test-pa10.test) +add_rostest(test/test-simulator.test) diff --git a/test/test-jointangle.py b/test/test-jointangle.py index 0f3838c7..71ef4c0c 100755 --- a/test/test-jointangle.py +++ b/test/test-jointangle.py @@ -31,7 +31,7 @@ class TestJointAngle(unittest.TestCase): @classmethod def setUpClass(self): h = PA10() - h.init() + h.init(robotname="PA10Controller(Robot)0") def test_get_joint_angles(self): h = PA10() diff --git a/test/test-simulator.test b/test/test-simulator.test new file mode 100644 index 00000000..d4ac8bf0 --- /dev/null +++ b/test/test-simulator.test @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file