diff --git a/rcl/test/CMakeLists.txt b/rcl/test/CMakeLists.txt index be8ad3484..c0561a385 100644 --- a/rcl/test/CMakeLists.txt +++ b/rcl/test/CMakeLists.txt @@ -73,10 +73,9 @@ function(test_target_function) AMENT_DEPENDENCIES ${rmw_implementation} ) - # TODO(hidmic): re-enable timer tests against RTI Connext once - # https://github.com/ros2/rcl/issues/687 is resolved + # TODO(asorbini): Remove these exceptions once ros2/rmw_connext is deprecated. set(AMENT_GTEST_ARGS "") - if(rmw_implementation STREQUAL "rmw_connext_cpp") + if(rmw_implementation MATCHES "rmw_connext(.*)_cpp") message(STATUS "Skipping test_timer${target_suffix} test.") set(AMENT_GTEST_ARGS "SKIP_TEST") endif() @@ -122,16 +121,16 @@ function(test_target_function) AMENT_DEPENDENCIES ${rmw_implementation} "osrf_testing_tools_cpp" ) + # TODO(asorbini): Remove these exceptions once ros2/rmw_connext is deprecated. set(AMENT_GTEST_ARGS "") - # TODO(wjwwood): remove this when the graph API works properly for connext dynamic if(rmw_implementation STREQUAL "rmw_connext_dynamic_cpp") message(STATUS "Skipping test_graph${target_suffix} test.") set(AMENT_GTEST_ARGS "SKIP_TEST") - # TODO(mm318): why rmw_connext tests run much slower than rmw_fastrtps and rmw_opensplice tests elseif(rmw_implementation STREQUAL "rmw_connext_cpp") message(STATUS "Increasing test_graph${target_suffix} test timeout.") set(AMENT_GTEST_ARGS TIMEOUT 180) endif() + rcl_add_custom_gtest(test_graph${target_suffix} SRCS rcl/test_graph.cpp ENV ${rmw_implementation_env_var} @@ -142,19 +141,19 @@ function(test_target_function) ${AMENT_GTEST_ARGS} ) + # TODO(asorbini): Remove these exceptions once ros2/rmw_connext is deprecated. set(AMENT_GTEST_ARGS "") - # TODO(mm318): why rmw_connext tests run much slower than rmw_fastrtps and rmw_opensplice tests - if(rmw_implementation STREQUAL "rmw_connext_cpp") + if(rmw_implementation MATCHES "rmw_connext(.*)_cpp") message(STATUS "Increasing test_info_by_topic${target_suffix} test timeout.") set(AMENT_GTEST_ARGS TIMEOUT 120) endif() + rcl_add_custom_gtest(test_info_by_topic${target_suffix} SRCS rcl/test_info_by_topic.cpp rcl/wait_for_entity_helpers.cpp ENV ${rmw_implementation_env_var} APPEND_LIBRARY_DIRS ${extra_lib_dirs} LIBRARIES ${PROJECT_NAME} AMENT_DEPENDENCIES ${rmw_implementation} "osrf_testing_tools_cpp" "test_msgs" - ${AMENT_GTEST_ARGS} ) rcl_add_custom_gtest(test_count_matched${target_suffix} @@ -254,8 +253,11 @@ function(test_target_function) LIBRARIES ${PROJECT_NAME} mimick AMENT_DEPENDENCIES ${rmw_implementation} "osrf_testing_tools_cpp" "test_msgs" ) + # TODO(asorbini) Enable message timestamp tests for rmw_connextdds on Windows + # once clock incompatibilities are resolved. if(rmw_implementation STREQUAL "rmw_fastrtps_cpp" OR - rmw_implementation STREQUAL "rmw_fastrtps_dynamic_cpp") + rmw_implementation STREQUAL "rmw_fastrtps_dynamic_cpp" OR + (rmw_implementation STREQUAL "rmw_connextdds" AND NOT WIN32)) message(STATUS "Enabling message timestamp test for ${rmw_implementation}") target_compile_definitions(test_subscription${target_suffix} PUBLIC "RMW_TIMESTAMPS_SUPPORTED=1" "RMW_RECEIVED_TIMESTAMP_SUPPORTED=1") diff --git a/rcl/test/rcl/test_events.cpp b/rcl/test/rcl/test_events.cpp index d99bac84c..c4cdc1cda 100644 --- a/rcl/test/rcl/test_events.cpp +++ b/rcl/test/rcl/test_events.cpp @@ -606,7 +606,6 @@ TEST_F(TestEventFixture, test_pubsub_liveliness_kill_pub) /* * Basic test of publisher and subscriber incompatible qos callback events. - * Only implemented in opensplice at the moment. */ TEST_P(TestEventFixture, test_pubsub_incompatible_qos) { diff --git a/rcl/test/rcl/test_get_actual_qos.cpp b/rcl/test/rcl/test_get_actual_qos.cpp index 15db5fe19..f590867d4 100644 --- a/rcl/test/rcl/test_get_actual_qos.cpp +++ b/rcl/test/rcl/test_get_actual_qos.cpp @@ -430,9 +430,9 @@ get_parameters(bool for_publisher) }); } } else { + // TODO(asorbini): Remove this block once ros2/rmw_connext is deprecated. if (rmw_implementation_str == "rmw_connext_cpp" || - rmw_implementation_str == "rmw_connext_dynamic_cpp" || - rmw_implementation_str == "rmw_opensplice_cpp") + rmw_implementation_str == "rmw_connext_dynamic_cpp") { /* * Test with non-default settings. diff --git a/rcl/test/rcl/test_graph.cpp b/rcl/test/rcl/test_graph.cpp index 9f9ed2504..bb49a1859 100644 --- a/rcl/test/rcl/test_graph.cpp +++ b/rcl/test/rcl/test_graph.cpp @@ -51,9 +51,6 @@ bool is_connext = std::string(rmw_get_implementation_identifier()).find("rmw_connext") == 0; -bool is_opensplice = - std::string(rmw_get_implementation_identifier()).find("rmw_opensplice") == 0; - class CLASSNAME (TestGraphFixture, RMW_IMPLEMENTATION) : public ::testing::Test { public: diff --git a/rcl_action/test/rcl_action/test_graph.cpp b/rcl_action/test/rcl_action/test_graph.cpp index bb8be4465..ea237f18a 100644 --- a/rcl_action/test/rcl_action/test_graph.cpp +++ b/rcl_action/test/rcl_action/test_graph.cpp @@ -358,6 +358,14 @@ class TestActionGraphMultiNodeFixture : public CLASSNAME(TestActionGraphFixture, ret = rcl_get_node_names(&this->remote_node, allocator, &node_names, &node_namespaces); ++attempts; ASSERT_LE(attempts, max_attempts) << "Unable to attain all required nodes"; + if (node_names.size < 3u) { + ret = rcutils_string_array_fini(&node_names); + ASSERT_EQ(RCUTILS_RET_OK, ret); + ret = rcutils_string_array_fini(&node_namespaces); + ASSERT_EQ(RCUTILS_RET_OK, ret); + node_names = rcutils_get_zero_initialized_string_array(); + node_namespaces = rcutils_get_zero_initialized_string_array(); + } } }