4 NAME =
'test_rthsell_setup' 6 import unittest, os, sys
8 from subprocess
import call, check_output, Popen, PIPE, STDOUT
13 pkg_path = check_output(
"rospack find openrtm_tools", shell=
True).rstrip()
14 script = os.path.join(pkg_path,
"scripts/rtshell-setup.sh")
15 self.assertTrue(os.path.exists(script))
17 check_output(
"bash -c 'source %s; RTCTREE_NAMESERVERS=localhost:2809 %s'"%(script, command), shell=
True, stderr=subprocess.STDOUT)
18 except subprocess.CalledProcessError, (e):
19 self.assertTrue(
False,
'subprocess.CalledProcessError: cmd:%s returncode:%s output:%s' % (e.cmd, e.returncode, e.output))
26 self.
run_rt_command(
'rtprint -n1 localhost:2809/SequenceOutComponent0.rtc:Float')
27 self.
run_rt_command(
'rtprint -n1 localhost:2809/SequenceOutComponent0.rtc:FloatSeq')
30 self.
run_rt_command(
'rtcat localhost:2809/SequenceOutComponent0.rtc')
33 if __name__ ==
'__main__':
35 rostest.run(PKG, NAME, TestOpenrtmTools, sys.argv)