Ask Your Question
0

colcon test errors

asked 2019-01-24 15:07:20 -0500

jdcarp gravatar image

updated 2019-01-24 17:02:32 -0500

jayess gravatar image

After installing ROS 2 Crystal from debian packages on Ubuntu 18.04, I followed the colcon tutorial to build and test the sample ros2 packages.

I first created the ros2 workspace:

$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws
$ wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
$ vcs import ~/ros2_ws/src < ros2.repos

I then was able to build the packages successfully:

$ colcon build --symlink-install
Summary: 228 packages finished [1min 3s]

Despite the packages being built successfully, colcon test produces errors.

$ colcon test
Summary: 228 packages finished [28min 27s]
8 packages had stderr output: demo_nodes_cpp osrf_pycommon pendulum_control rcl rclcpp_action rqt test_cli tf2_ros
6 packages had test failures: demo_nodes_cpp pendulum_control rcl rclcpp_action test_cli tf2_ros

Running colcon test again produced different errors.

$ colcon test
Summary: 228 packages finished [27min 22s]
  11 packages had stderr output: composition demo_nodes_cpp image_tools osrf_pycommon pendulum_control rcl rclcpp_action rqt test_communication test_rclcpp tf2_ros
9 packages had test failures: composition demo_nodes_cpp image_tools pendulum_control rcl rclcpp_action test_communication test_rclcpp tf2_ros

I'm not sure what the issue could be, any insight would be really appreciated.

Edit: Adding errors produced by both colcon test attempts. Below are the snippets of the terminal outputs that are relevant to stderr outputs, or test failure outputs:

user@user-machine:~$ cd ros2_ws/
user@user-machine:~/ros2_ws$ colcon test

Starting >>> test_osrf_testing_tools_cpp
--- stderr: osrf_pycommon
test_remove_ansi_escape_senquences (tests.unit.test_terminal_color.test_ansi_re.TestTerminalColorAnsiRe) ... ok
test_remove_ansi_escape_senquences_false_positives (tests.unit.test_terminal_color.test_ansi_re.TestTerminalColorAnsiRe) ... ok
test_split_by_ansi_escape_sequence (tests.unit.test_terminal_color.test_ansi_re.TestTerminalColorAnsiRe) ... ok
test_ansi (tests.unit.test_terminal_color.test_impl.TestTerminalColorImpl) ... ok
test_enable_and_disable_ansi_color_substitution_globally (tests.unit.test_terminal_color.test_impl.TestTerminalColorImpl) ... ok
test_format_color (tests.unit.test_terminal_color.test_impl.TestTerminalColorImpl) ... ok
test_get_ansi_dict (tests.unit.test_terminal_color.test_impl.TestTerminalColorImpl) ... ok
test_sanitize (tests.unit.test_terminal_color.test_impl.TestTerminalColorImpl) ... ok
test_call_prepare_arguments (tests.unit.test_cli_utils.test_verb_pattern.TestCliUtilsVerbPattern) ... /home/user/ros2_ws/build/osrf_pycommon/osrf_pycommon/cli_utils/verb_pattern.py:44: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  arguments, _, _, defaults = inspect.getargspec(func)
/home/user/ros2_ws/src/osrf/osrf_pycommon/tests/unit/test_cli_utils/test_verb_pattern.py:69: DeprecationWarning: Please use assertRaisesRegex instead.
  with self.assertRaisesRegexp(ValueError, 'one or two parameters'):
/home/user/ros2_ws/build/osrf_pycommon/osrf_pycommon/cli_utils/verb_pattern.py:55: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  ', '.join(inspect.getargspec(func)[0])))
ok
test_split_arguments_by_verb (tests.unit.test_cli_utils.test_verb_pattern.TestCliUtilsVerbPattern) ... ok
test_is_tty (tests.unit.test_terminal_utils.TestTerminalUtils) ... ok
test_async_execute_process_no_emulation_shell_false (tests.unit.test_process_utils.test_async_execute_process.TestProcessUtilsAsyncExecuteProcess) ... /usr/lib/python3.6/asyncio/base_subprocess.py:131: ResourceWarning: unclosed transport <_UnixSubprocessTransport pid=1601 returncode=0 stdin=<_UnixWritePipeTransport closed fd=7 closed> stdout=<_UnixReadPipeTransport closed fd=8 closed> stderr=<_UnixReadPipeTransport closed fd=10 closed>>
  source=self)
ok
test_async_execute_process_no_emulation_shell_false_combined (tests.unit.test_process_utils.test_async_execute_process.TestProcessUtilsAsyncExecuteProcess) ... /usr/lib/python3.6/asyncio/base_subprocess.py:131: ResourceWarning: unclosed transport <_UnixSubprocessTransport pid=1610 returncode=0 stdin=<_UnixWritePipeTransport closed fd=7 closed> stdout=<_UnixReadPipeTransport closed fd=8 closed>>
  source=self)
ok
test_async_execute_process_no_emulation_shell_true (tests.unit.test_process_utils.test_async_execute_process.TestProcessUtilsAsyncExecuteProcess) ... /usr/lib/python3.6/asyncio/base_subprocess.py:131: ResourceWarning: unclosed transport <_UnixSubprocessTransport pid=1611 returncode=0 stdin=<_UnixWritePipeTransport closed fd=7 closed> stdout=<_UnixReadPipeTransport closed fd=8 closed> stderr=<_UnixReadPipeTransport closed fd=10 closed>>
  source=self)
ok
test_async_execute_process_no_emulation_shell_true_combined (tests.unit.test_process_utils.test_async_execute_process.TestProcessUtilsAsyncExecuteProcess) ... /usr/lib/python3 ...
(more)
edit retag flag offensive close merge delete

Comments

You would need to share the actual stderr output as well as details about the test failures in order to give you specific feedback.

Dirk Thomas gravatar imageDirk Thomas ( 2019-01-24 15:09:54 -0500 )edit

Thank you for your reply! I've added the relevant terminal outputs in an edit.

jdcarp gravatar imagejdcarp ( 2019-01-24 15:59:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-24 18:44:25 -0500

Dirk Thomas gravatar image

First of all you are not building Crystal but the current source code from the master branch. You are not using the Crystal Debian packages you installed before. Either or would be sufficient - you don't have to do both.

Some packages do output something on stderr during running the tests (e.g. osrf_pycommon). Others are printing Errors while running CTest in case any tests fail. From the output it is still not clear though which tests failed.

You can also compare your results with the latest nightly builds and their results: https://ci.ros2.org/view/nightly/

edit flag offensive delete link more

Comments

Thank you, sorry for the confusion!

jdcarp gravatar imagejdcarp ( 2019-01-25 11:38:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-01-24 15:07:20 -0500

Seen: 262 times

Last updated: Jan 24