Skip to content
Merged
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
55 changes: 43 additions & 12 deletions test_rclcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,50 @@ if(BUILD_TESTING)
set(rmw_implementation2_is_fastrtps TRUE)
endif()

# Skipped tests between fastrtps and others, as the node names are communicated with a different mechanism.
# TODO(ivanpauno): Reenable this tests after the other implementations also use one Participant per Context.
if(
(NOT rmw_implementation1_is_fastrtps AND NOT rmw_implementation2_is_fastrtps) OR
(rmw_implementation1_is_fastrtps AND rmw_implementation2_is_fastrtps)
)
custom_launch_test_two_executables(test_node_name
node_with_name node_name_list
ARGS1 "${rmw_implementation1}" ARGS2 "node_with_name_${rmw_implementation1}"
RMW1 ${rmw_implementation1} RMW2 ${rmw_implementation2}
TIMEOUT 15
${SKIP_TEST})
set(rmw_implementation1_is_connext FALSE)
set(rmw_implementation2_is_connext FALSE)
if(rmw_implementation1 MATCHES "(.*)connext(.*)")
set(rmw_implementation1_is_connext TRUE)
endif()
if(rmw_implementation2 MATCHES "(.*)connext(.*)")
set(rmw_implementation2_is_connext TRUE)
endif()

set(rmw_implementation1_is_cyclonedds FALSE)
set(rmw_implementation2_is_cyclonedds FALSE)
if(rmw_implementation1 MATCHES "(.*)cyclonedds(.*)")
set(rmw_implementation1_is_cyclonedds TRUE)
endif()
if(rmw_implementation2 MATCHES "(.*)cyclonedds(.*)")
set(rmw_implementation2_is_cyclonedds TRUE)
endif()


# Whitelist cross-vendor tests
if(NOT (rmw_implementation1 STREQUAL rmw_implementation2))
# TODO(sloretz) enable connext/cyclone/fastrtps when all three use 1 participant per context
if(
(rmw_implementation1_is_fastrtps AND rmw_implementation2_is_cyclonedds) OR
(rmw_implementation1_is_cyclonedds AND rmw_implementation2_is_fastrtps) OR
(rmw_implementation1_is_fastrtps AND rmw_implementation2_is_fastrtps)
)
# Whitelisted cross-vendor tests
set(_crt_SKIP_TEST ${SKIP_TEST})
else()
# Default skip cross-vendor tests
set(_crt_SKIP_TEST "SKIP_TEST")
endif()
else()
# Same vendor tests always allowed
set(_crt_SKIP_TEST ${SKIP_TEST})
endif()

custom_launch_test_two_executables(test_node_name
node_with_name node_name_list
ARGS1 "${rmw_implementation1}" ARGS2 "node_with_name_${rmw_implementation1}"
RMW1 ${rmw_implementation1} RMW2 ${rmw_implementation2}
TIMEOUT 15
${_crt_SKIP_TEST})
endmacro()

macro(targets)
Expand Down