examples icon indicating copy to clipboard operation
examples copied to clipboard

Question About Colcon Test

Open leizhenyu-lzy opened this issue 10 months ago • 3 comments
trafficstars

Environment : OS: Ubuntu 22.04.5 LTS x86_64 ROS Version : ros2/humble Python version : Python 3.10.12 Flake8 version : 4.0.1

Problem : Successfully run the colcon build or colcon build --symlink-install, but have problem in running colcon test

Image


=============================== warnings summary ===============================
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
  Warning: SelectableGroups dict interface is deprecated. Use select.

-- Docs: https://docs.pytest.org/en/stable/warnings.html
---
Finished <<< launch_testing_examples [18.0s]

Summary: 22 packages finished [18.2s]
  10 packages had stderr output: examples_rclpy_executors examples_rclpy_guard_conditions examples_rclpy_minimal_action_client examples_rclpy_minimal_action_server examples_rclpy_minimal_client examples_rclpy_minimal_publisher examples_rclpy_minimal_service examples_rclpy_minimal_subscriber examples_rclpy_pointcloud_publisher launch_testing_examples

What can I do to solve this problem? Thank you.

leizhenyu-lzy avatar Jan 18 '25 07:01 leizhenyu-lzy

Do I need to remove the folder "launch_testing_examples" ? Because in the documentation this folder do not exist.

Image

leizhenyu-lzy avatar Jan 18 '25 07:01 leizhenyu-lzy

@leizhenyu-lzy can you provide the complete procedure from the beginning instead of posting the images?

but have problem in running colcon test

if colcon test has any error, you can check the result with colcon test-result --verbose and the fix the failures.

Do I need to remove the folder "launch_testing_examples" ? Because in the documentation this folder do not exist.

if you are following the examples, i do not think you need to remove them because those are the packages in examples. e.g https://github.com/ros2/examples/tree/rolling/rclpy/executors/examples_rclpy_executors

fujitatomoya avatar Jan 21 '25 05:01 fujitatomoya

"stderr output" doesn't mean that there were test failures: it simply means that some tests printed things to stderr, which could just be deprecation warnings.

If tests had failed, colcon would've printed [ with test failures ] next to Finished <<< launch_testing_examples [18.0s].

christophebedard avatar Jan 21 '25 16:01 christophebedard