ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

logging result with rosunit in stdout

asked 2011-10-11 07:01:21 -0500

updated 2011-10-11 10:50:58 -0500

kwc gravatar image

Hi people!! I have some unitary tests in python made with rosunit. They work well but I'd like to log to stdout some test messages when I run:

rosrun rosunit rosunit --text mytestfile.py

You can see below some tried alternatives but none of them worked. Any Idea? Thanks in advance :-):

print "hi"

or

rospy.loginfo("hi")

and even:

def setUp(self):
         logging.basicConfig( stream=sys.stdout )
         self.log=logging.getLogger( "TestDTW.output" )
         self.log.setLevel( logging.DEBUG )

def testXX(self):
         self.log.debug("hi")
  
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2011-10-11 08:24:45 -0500

kwc gravatar image

There was a bug in rosunit where the --text option was not propagating properly. I'm testing a fix in r15181.

You can get a patch from here:

https://code.ros.org/trac/ros/changeset/15181

Thanks for noting this issue.

edit flag offensive delete link more

Comments

nice :-) Thanks.
Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2011-10-12 20:16:43 -0500 )edit

Question Tools

Stats

Asked: 2011-10-11 07:01:21 -0500

Seen: 1,180 times

Last updated: Oct 11 '11