From eeccdd0accf45c04945bf0c8987e20e80688ffc5 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Wed, 29 Apr 2020 19:05:14 -0700 Subject: [PATCH 1/3] Change which rmws do cross node name tests Disable connext cross-vendor since it still uses 1 participant per node Enable Fast-RTPS and Cyclone cross vendor Signed-off-by: Shane Loretz Signed-off-by: Shane Loretz --- test_rclcpp/CMakeLists.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test_rclcpp/CMakeLists.txt b/test_rclcpp/CMakeLists.txt index b468eea1..29bdfd13 100644 --- a/test_rclcpp/CMakeLists.txt +++ b/test_rclcpp/CMakeLists.txt @@ -192,10 +192,31 @@ if(BUILD_TESTING) set(rmw_implementation2_is_fastrtps TRUE) endif() + 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() + # 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_cyclonedds) OR + (rmw_implementation1_is_cyclonedds AND rmw_implementation2_is_fastrtps) OR + (rmw_implementation1_is_cyclonedds AND rmw_implementation2_is_cyclonedds) OR + (rmw_implementation1_is_connext AND rmw_implementation2_is_connext) OR (rmw_implementation1_is_fastrtps AND rmw_implementation2_is_fastrtps) ) custom_launch_test_two_executables(test_node_name From e0842247b0b9ea3d2efad8858cbab738a54af8b1 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 30 Apr 2020 13:36:12 -0700 Subject: [PATCH 2/3] Mark tests as skipped instead of not generating Generate all cross-vendor tests Whitelist which cross-vendor tests are expected to work Signed-off-by: Shane Loretz Signed-off-by: Shane Loretz --- test_rclcpp/CMakeLists.txt | 40 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/test_rclcpp/CMakeLists.txt b/test_rclcpp/CMakeLists.txt index 29bdfd13..851ad05d 100644 --- a/test_rclcpp/CMakeLists.txt +++ b/test_rclcpp/CMakeLists.txt @@ -210,22 +210,32 @@ if(BUILD_TESTING) set(rmw_implementation2_is_cyclonedds 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( - (rmw_implementation1_is_fastrtps AND rmw_implementation2_is_cyclonedds) OR - (rmw_implementation1_is_cyclonedds AND rmw_implementation2_is_fastrtps) OR - (rmw_implementation1_is_cyclonedds AND rmw_implementation2_is_cyclonedds) OR - (rmw_implementation1_is_connext AND rmw_implementation2_is_connext) 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}) + + # 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) From b6de342b259b319f7faccc8483403458143c1505 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 30 Apr 2020 16:21:50 -0700 Subject: [PATCH 3/3] Whitespace Signed-off-by: Shane Loretz --- test_rclcpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_rclcpp/CMakeLists.txt b/test_rclcpp/CMakeLists.txt index 851ad05d..ba90fbbf 100644 --- a/test_rclcpp/CMakeLists.txt +++ b/test_rclcpp/CMakeLists.txt @@ -212,7 +212,7 @@ if(BUILD_TESTING) # Whitelist cross-vendor tests - if (NOT (rmw_implementation1 STREQUAL rmw_implementation2)) + 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