11 from __future__
import print_function
21 from rostest.rostestutil
import rostest_name_from_path
30 Generate the absolute results log file name. This will be located in the 31 cmake build directory, prefixed with 'rocon_test' and using the specially 32 generated underscore separated log name. 34 results_log_file = rosunit.xml_results_file(package, results_log_name, is_rostest=
True)
36 return results_log_file.replace(
'rostest',
'rocon_test', 1)
40 Configures the logger and generates an underscored pkg_dir relative name 41 (e.g. launch/pirate_chatter.multilaunch -> launch_pirate_chatter 43 roslaunch.core.add_printlog_handler(logging.getLogger(
'rocon_test').info)
44 roslaunch.core.add_printerrlog_handler(logging.getLogger(
'rocon_test').error)
46 pkg_dir = r.get_path(package)
47 results_log_name = rostest_name_from_path(pkg_dir, filename)
48 log_basename =
'rocon_test-%s-%s.log' % (socket.gethostname(), os.getpid())
49 unused_log_name = rosgraph.roslogging.configure_logging(
'rocon_test', filename=log_basename)
51 return results_log_name, results_log_file
57 logging.getLogger(
'rocon_test').info(msg)
58 print(
"[ROCON_TEST] " + msg)
64 logging.getLogger(
'rocon_test').error(msg)
65 print >> sys.stderr,
"[ROCON_TEST] " + msg
71 if __name__ ==
'__main__':
def configure_logging(package, filename)
def printlogerr(msg, args)
def xml_results_file(package, results_log_name)
Methods.