Skip to content

Test/add cli tests#3129

Open
ielson wants to merge 3 commits intoros-controls:masterfrom
ielson:test/add-cli-tests
Open

Test/add cli tests#3129
ielson wants to merge 3 commits intoros-controls:masterfrom
ielson:test/add-cli-tests

Conversation

@ielson
Copy link
Copy Markdown

@ielson ielson commented Mar 18, 2026

Closes #357

Summary

Add tests for ros2 control CLI verbs under 'controller_manager/test', using the existing local controller_manager test setup instead of depending on ros2_control_demos.

The new tests cover CLI behavior for:

  • list_controllers
  • list_controller_types
  • list_hardware_components
  • list_hardware_interfaces
  • load_controller
  • reload_controller_libraries --force-kill
  • reload_controller_libraries failure path without --force-kill
  • set_controller_state
  • switch_controllers --best-effort
  • cleanup_controller
  • unload_controller
  • view_hardware_status

Files added:

  • test_ros2_controlcli_verbs.py
  • test_ros2_controlcli.yaml

Testing

  • colcon test --packages-select controller_manager --ctest-args -R test_ros2_controlcli_verbs --output-on-failure
  • colcon test-result --all --verbose

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

@ielson
Copy link
Copy Markdown
Author

ielson commented Mar 18, 2026

PR is ready for review, from the requested checks just couldn't check if the other workflows passes, because they are awaiting approval

@bmagyar
Copy link
Copy Markdown
Member

bmagyar commented Mar 28, 2026

CI kicked off!

@ielson
Copy link
Copy Markdown
Author

ielson commented Mar 31, 2026

hey @bmagyar I believe that the tests didn't pass before because my branch was outdated but I have merged the new changes on it.
Can you approve the CI again?

@ielson
Copy link
Copy Markdown
Author

ielson commented Apr 14, 2026

@bmagyar friendly ping, can you kick the CI off again?

@ielson ielson force-pushed the test/add-cli-tests branch from 72ca142 to a113bd1 Compare April 15, 2026 21:26
ielson added 2 commits April 15, 2026 18:34
Signed-off-by: Daniel Mascarenhas <danmascandrade@gmail.com>
Signed-off-by: Daniel Mascarenhas <daniel.mascarenhas@saipem.com>
Signed-off-by: Daniel Mascarenhas <danmascandrade@gmail.com>
Signed-off-by: Daniel Mascarenhas <daniel.mascarenhas@saipem.com>
@ielson ielson force-pushed the test/add-cli-tests branch from 1b2e4f0 to ac32bf1 Compare April 15, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation and/or tests for ros2controlcli

2 participants