From a26ee9dc495ad81b97c9a5918ea4fcbfd3982d25 Mon Sep 17 00:00:00 2001 From: Julien Enoch Date: Tue, 24 Feb 2026 15:11:43 +0100 Subject: [PATCH 1/3] test_rmw_implementation: add test isolation Signed-off-by: Julien Enoch --- test_rmw_implementation/CMakeLists.txt | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/test_rmw_implementation/CMakeLists.txt b/test_rmw_implementation/CMakeLists.txt index c565ceb4..df3f611e 100644 --- a/test_rmw_implementation/CMakeLists.txt +++ b/test_rmw_implementation/CMakeLists.txt @@ -13,6 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake REQUIRED) +find_package(ament_cmake_ros REQUIRED) if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) @@ -199,100 +200,100 @@ if(BUILD_TESTING) message(STATUS "Creating API tests for '${rmw_implementation}'") set(rmw_implementation_env_var RMW_IMPLEMENTATION=${rmw_implementation}) - ament_add_gtest_test(test_init_shutdown + ament_add_ros_isolated_gtest_test(test_init_shutdown TEST_NAME test_init_shutdown${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_init_options + ament_add_ros_isolated_gtest_test(test_init_options TEST_NAME test_init_options${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_create_destroy_node + ament_add_ros_isolated_gtest_test(test_create_destroy_node TEST_NAME test_create_destroy_node${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_publisher + ament_add_ros_isolated_gtest_test(test_publisher TEST_NAME test_publisher${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_subscription + ament_add_ros_isolated_gtest_test(test_subscription TEST_NAME test_subscription${target_suffix} TIMEOUT 120 ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_serialize_deserialize + ament_add_ros_isolated_gtest_test(test_serialize_deserialize TEST_NAME test_serialize_deserialize${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_publisher_allocator + ament_add_ros_isolated_gtest_test(test_publisher_allocator TEST_NAME test_publisher_allocator${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_subscription_allocator + ament_add_ros_isolated_gtest_test(test_subscription_allocator TEST_NAME test_subscription_allocator${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_wait_set + ament_add_ros_isolated_gtest_test(test_wait_set TEST_NAME test_wait_set${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_graph_api + ament_add_ros_isolated_gtest_test(test_graph_api TEST_NAME test_graph_api${target_suffix} TIMEOUT 120 ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_unique_identifiers + ament_add_ros_isolated_gtest_test(test_unique_identifiers TEST_NAME test_unique_identifiers${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_service + ament_add_ros_isolated_gtest_test(test_service TEST_NAME test_service${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_client + ament_add_ros_isolated_gtest_test(test_client TEST_NAME test_client${target_suffix} TIMEOUT 120 ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_qos_profile_check_compatible + ament_add_ros_isolated_gtest_test(test_qos_profile_check_compatible TEST_NAME test_qos_profile_check_compatible${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_duration_infinite + ament_add_ros_isolated_gtest_test(test_duration_infinite TEST_NAME test_duration_infinite${target_suffix} ENV ${rmw_implementation_env_var} ) - ament_add_gtest_test(test_event + ament_add_ros_isolated_gtest_test(test_event TEST_NAME test_event${target_suffix} ENV ${rmw_implementation_env_var} From 0b65d4632699f9929917ae98d16b0f4ff4a7e478 Mon Sep 17 00:00:00 2001 From: Julien Enoch Date: Tue, 24 Feb 2026 16:25:09 +0100 Subject: [PATCH 2/3] add missing test_depend on ament_cmake_ros Signed-off-by: Julien Enoch --- test_rmw_implementation/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_rmw_implementation/package.xml b/test_rmw_implementation/package.xml index 7e0678b9..5d206cd6 100644 --- a/test_rmw_implementation/package.xml +++ b/test_rmw_implementation/package.xml @@ -14,7 +14,7 @@ ament_cmake - ament_cmake_gtest + ament_cmake_ros ament_lint_auto ament_lint_common osrf_testing_tools_cpp From 6c388670068df278821b797dd78f8fb16dae754c Mon Sep 17 00:00:00 2001 From: Julien Enoch Date: Tue, 24 Feb 2026 16:41:22 +0100 Subject: [PATCH 3/3] Fix find_package(ament_cmake_ros) place Signed-off-by: Julien Enoch --- test_rmw_implementation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_rmw_implementation/CMakeLists.txt b/test_rmw_implementation/CMakeLists.txt index df3f611e..9c2cacd8 100644 --- a/test_rmw_implementation/CMakeLists.txt +++ b/test_rmw_implementation/CMakeLists.txt @@ -13,9 +13,9 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake REQUIRED) -find_package(ament_cmake_ros REQUIRED) if(BUILD_TESTING) + find_package(ament_cmake_ros REQUIRED) find_package(ament_cmake_gtest REQUIRED) find_package(osrf_testing_tools_cpp REQUIRED)