Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 11 additions & 4 deletions test_security/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,22 @@ if(BUILD_TESTING)
endfunction()

function(custom_security_test_c target)
set(test_env
RCL_ASSERT_RMW_ID_MATCHES=${rmw_implementation}
RMW_IMPLEMENTATION=${rmw_implementation}
ROS_SECURITY_KEYSTORE=${KEYSTORE_DIRECTORY_NATIVE_PATH}
PATH="${TEST_PATH}"
)
if(rmw_implementation STREQUAL "rmw_connextdds")
list(APPEND test_env RTI_MONITORING2_ENABLE=false)
endif()

ament_add_gtest(
"${target}${target_suffix}" ${ARGN}
TIMEOUT 10
APPEND_LIBRARY_DIRS "${append_library_dirs}"
ENV
RCL_ASSERT_RMW_ID_MATCHES=${rmw_implementation}
RMW_IMPLEMENTATION=${rmw_implementation}
ROS_SECURITY_KEYSTORE=${KEYSTORE_DIRECTORY_NATIVE_PATH}
PATH="${TEST_PATH}"
${test_env}
)
if(TARGET ${target}${target_suffix})
target_link_libraries(${target}${target_suffix}
Expand Down
4 changes: 4 additions & 0 deletions test_security/test/test_secure_publisher_subscriber.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def generate_test_description():
publisher_env['ROS_SECURITY_ENABLE'] = '@PUBLISHER_ROS_SECURITY_ENABLE@'
publisher_env['ROS_SECURITY_STRATEGY'] = '@PUBLISHER_ROS_SECURITY_STRATEGY@'
publisher_env['ROS_SECURITY_KEYSTORE'] = '@PUBLISHER_ROS_SECURITY_KEYSTORE@'
if '@PUBLISHER_RMW@' == 'rmw_connextdds':
publisher_env['RTI_MONITORING2_ENABLE'] = 'false'

launch_description.add_action(ExecuteProcess(
cmd=publisher_cmd,
Expand All @@ -57,6 +59,8 @@ def generate_test_description():
subscriber_env['ROS_SECURITY_ENABLE'] = '@SUBSCRIBER_ROS_SECURITY_ENABLE@'
subscriber_env['ROS_SECURITY_STRATEGY'] = '@SUBSCRIBER_ROS_SECURITY_STRATEGY@'
subscriber_env['ROS_SECURITY_KEYSTORE'] = '@SUBSCRIBER_ROS_SECURITY_KEYSTORE@'
if '@SUBSCRIBER_RMW@' == 'rmw_connextdds':
subscriber_env['RTI_MONITORING2_ENABLE'] = 'false'

subscriber_process = ExecuteProcess(
cmd=subscriber_cmd,
Expand Down