colcon test errors
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 ...
You would need to share the actual
stderr
output as well as details about the test failures in order to give you specific feedback.Thank you for your reply! I've added the relevant terminal outputs in an edit.