Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions composition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ if(BUILD_TESTING)
"test_dlopen_composition"
"test_linktime_composition"
"test_manual_composition"
"test_api_pubsub_composition"
"test_api_srv_composition_client_first"
"test_api_srv_composition"
)
foreach(test_name IN LISTS test_names)
configure_file(
Expand Down
6 changes: 3 additions & 3 deletions composition/test/test_api_pubsub_composition.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import launch_testing_ros
def generate_test_description():
launch_description = LaunchDescription()
process_under_test = ExecuteProcess(
cmd=['@API_COMPOSITION_EXECUTABLE@'],
cmd=['ros2', 'run', 'rclcpp_components', 'component_container'],
name='test_api_composition',
output='screen'
)
launch_description.add_action(process_under_test)
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'ros2', 'component', 'load', '/ComponentManager',
'composition', 'composition::Talker'
],
name='load_talker_component'
Expand All @@ -43,7 +43,7 @@ def generate_test_description():
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'ros2', 'component', 'load', '/ComponentManager',
'composition', 'composition::Listener'
],
name='load_listener_component'
Expand Down
6 changes: 3 additions & 3 deletions composition/test/test_api_srv_composition.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import launch_testing_ros
def generate_test_description():
launch_description = LaunchDescription()
process_under_test = ExecuteProcess(
cmd=['@API_COMPOSITION_EXECUTABLE@'],
cmd=['ros2', 'run', 'rclcpp_components', 'component_container'],
name='test_api_composition',
output='screen'
)
launch_description.add_action(process_under_test)
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'ros2', 'component', 'load', '/ComponentManager',
'composition', 'composition::Server'
],
name='load_server_component'
Expand All @@ -43,7 +43,7 @@ def generate_test_description():
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'ros2', 'component', 'load', '/ComponentManager',
'composition', 'composition::Client'
],
name='load_client_component'
Expand Down
24 changes: 15 additions & 9 deletions composition/test/test_api_srv_composition_client_first.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import unittest

from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.actions import TimerAction

import launch_testing
import launch_testing.actions
Expand All @@ -26,28 +27,33 @@ import launch_testing_ros
def generate_test_description():
launch_description = LaunchDescription()
process_under_test = ExecuteProcess(
cmd=['@API_COMPOSITION_EXECUTABLE@'],
cmd=['ros2', 'run', 'rclcpp_components', 'component_container'],
name='test_api_composition',
output='screen'
)
launch_description.add_action(process_under_test)
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'ros2', 'component', 'load', '/ComponentManager',
'composition', 'composition::Client'
],
name='load_client_component'
)
)
launch_description.add_action(
ExecuteProcess(
cmd=[
'@API_COMPOSITION_CLI_EXECUTABLE@',
'composition', 'composition::Server',
'--delay', '5000'
],
name='load_server_component'
TimerAction(
period=5.0,
actions=[
ExecuteProcess(
cmd=[
'ros2', 'component',
'load', '/ComponentManager',
'composition', 'composition::Server',
],
name='load_server_component'
)
]
)
)
launch_description.add_action(
Expand Down