From a667583821fb3b1c0830420ce3b0517df1e9f8c4 Mon Sep 17 00:00:00 2001 From: brawner Date: Fri, 12 Jun 2020 11:40:15 -0700 Subject: [PATCH] Reorganize test directory and split CMakeLists.txt (#1173) Signed-off-by: Stephen Brawner --- rclcpp/CMakeLists.txt | 434 +----------------- rclcpp/test/CMakeLists.txt | 434 ++++++++++++++++++ .../cmake/rclcpp_add_build_failure_test.cmake | 0 .../test_multi_threaded_executor.cpp | 0 .../node_interfaces/node_wrapper.hpp | 6 +- ...topics_interface_const_ptr_rclcpp_node.cpp | 0 ...opics_interface_const_ptr_wrapped_node.cpp | 0 ...topics_interface_const_ref_rclcpp_node.cpp | 0 ...opics_interface_const_ref_wrapped_node.cpp | 0 .../test_get_node_interfaces.cpp | 0 rclcpp/test/{ => rclcpp}/test_client.cpp | 0 .../test/{ => rclcpp}/test_create_timer.cpp | 0 rclcpp/test/{ => rclcpp}/test_duration.cpp | 0 rclcpp/test/{ => rclcpp}/test_executor.cpp | 0 .../test_expand_topic_or_service_name.cpp | 0 .../test_externally_defined_services.cpp | 0 .../{ => rclcpp}/test_find_weak_nodes.cpp | 0 .../{ => rclcpp}/test_function_traits.cpp | 0 .../{ => rclcpp}/test_guard_condition.cpp | 0 rclcpp/test/{ => rclcpp}/test_init.cpp | 0 .../{ => rclcpp}/test_interface_traits.cpp | 0 .../test_intra_process_buffer.cpp | 0 .../test_intra_process_manager.cpp | 0 .../test/{ => rclcpp}/test_loaned_message.cpp | 0 rclcpp/test/{ => rclcpp}/test_logger.cpp | 0 rclcpp/test/{ => rclcpp}/test_logging.cpp | 0 rclcpp/test/{ => rclcpp}/test_node.cpp | 0 .../{ => rclcpp}/test_node_global_args.cpp | 0 .../test/{ => rclcpp}/test_node_options.cpp | 0 rclcpp/test/{ => rclcpp}/test_parameter.cpp | 0 .../{ => rclcpp}/test_parameter_client.cpp | 0 .../test_parameter_events_filter.cpp | 0 .../test/{ => rclcpp}/test_parameter_map.cpp | 0 rclcpp/test/{ => rclcpp}/test_publisher.cpp | 0 .../test_publisher_subscription_count_api.cpp | 0 rclcpp/test/{ => rclcpp}/test_qos.cpp | 0 rclcpp/test/{ => rclcpp}/test_qos_event.cpp | 0 rclcpp/test/{ => rclcpp}/test_rate.cpp | 0 .../test_ring_buffer_implementation.cpp | 0 .../{ => rclcpp}/test_serialized_message.cpp | 0 .../test_serialized_message_allocator.cpp | 0 rclcpp/test/{ => rclcpp}/test_service.cpp | 0 .../test/{ => rclcpp}/test_subscription.cpp | 0 .../test_subscription_options.cpp | 0 .../test_subscription_publisher_count_api.cpp | 0 .../{ => rclcpp}/test_subscription_traits.cpp | 0 rclcpp/test/{ => rclcpp}/test_time.cpp | 0 rclcpp/test/{ => rclcpp}/test_time_source.cpp | 0 rclcpp/test/{ => rclcpp}/test_timer.cpp | 0 rclcpp/test/{ => rclcpp}/test_utilities.cpp | 0 rclcpp/test/{ => rclcpp}/test_wait_set.cpp | 0 .../test_subscription_topic_statistics.cpp | 0 .../test_topic_stats_utils.hpp | 6 +- 53 files changed, 441 insertions(+), 439 deletions(-) create mode 100644 rclcpp/test/CMakeLists.txt rename rclcpp/{ => test}/cmake/rclcpp_add_build_failure_test.cmake (100%) rename rclcpp/test/{ => rclcpp}/executors/test_multi_threaded_executor.cpp (100%) rename rclcpp/test/{ => rclcpp}/node_interfaces/node_wrapper.hpp (93%) rename rclcpp/test/{ => rclcpp}/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp (100%) rename rclcpp/test/{ => rclcpp}/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp (100%) rename rclcpp/test/{ => rclcpp}/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp (100%) rename rclcpp/test/{ => rclcpp}/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp (100%) rename rclcpp/test/{ => rclcpp}/node_interfaces/test_get_node_interfaces.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_client.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_create_timer.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_duration.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_executor.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_expand_topic_or_service_name.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_externally_defined_services.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_find_weak_nodes.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_function_traits.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_guard_condition.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_init.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_interface_traits.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_intra_process_buffer.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_intra_process_manager.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_loaned_message.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_logger.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_logging.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_node.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_node_global_args.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_node_options.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_parameter.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_parameter_client.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_parameter_events_filter.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_parameter_map.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_publisher.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_publisher_subscription_count_api.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_qos.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_qos_event.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_rate.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_ring_buffer_implementation.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_serialized_message.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_serialized_message_allocator.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_service.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_subscription.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_subscription_options.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_subscription_publisher_count_api.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_subscription_traits.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_time.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_time_source.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_timer.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_utilities.cpp (100%) rename rclcpp/test/{ => rclcpp}/test_wait_set.cpp (100%) rename rclcpp/test/{ => rclcpp}/topic_statistics/test_subscription_topic_statistics.cpp (100%) rename rclcpp/test/{ => rclcpp}/topic_statistics/test_topic_stats_utils.hpp (95%) diff --git a/rclcpp/CMakeLists.txt b/rclcpp/CMakeLists.txt index 4562375a15..81db9a365d 100644 --- a/rclcpp/CMakeLists.txt +++ b/rclcpp/CMakeLists.txt @@ -212,442 +212,10 @@ ament_export_dependencies(statistics_msgs) ament_export_dependencies(tracetools) if(BUILD_TESTING) - find_package(ament_cmake_gtest REQUIRED) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() - find_package(rmw_implementation_cmake REQUIRED) - find_package(rosidl_default_generators REQUIRED) - - find_package(test_msgs REQUIRED) - - include(cmake/rclcpp_add_build_failure_test.cmake) - - add_definitions(-DTEST_RESOURCES_DIRECTORY="${CMAKE_CURRENT_BINARY_DIR}/test/resources") - - rosidl_generate_interfaces(${PROJECT_NAME}_test_msgs - test/msg/Header.msg - test/msg/MessageWithHeader.msg - DEPENDENCIES builtin_interfaces - LIBRARY_NAME ${PROJECT_NAME} - SKIP_INSTALL - ) - - ament_add_gtest(test_client test/test_client.cpp) - if(TARGET test_client) - ament_target_dependencies(test_client - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_client ${PROJECT_NAME}) - endif() - ament_add_gtest(test_create_timer test/test_create_timer.cpp) - if(TARGET test_create_timer) - ament_target_dependencies(test_create_timer - "rcl_interfaces" - "rmw" - "rcl" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_create_timer ${PROJECT_NAME}) - target_include_directories(test_create_timer PRIVATE test/) - endif() - ament_add_gtest(test_expand_topic_or_service_name test/test_expand_topic_or_service_name.cpp) - if(TARGET test_expand_topic_or_service_name) - ament_target_dependencies(test_expand_topic_or_service_name - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_expand_topic_or_service_name ${PROJECT_NAME}) - endif() - ament_add_gtest(test_function_traits test/test_function_traits.cpp) - if(TARGET test_function_traits) - target_include_directories(test_function_traits PUBLIC include) - ament_target_dependencies(test_function_traits - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - endif() - ament_add_gmock(test_intra_process_manager test/test_intra_process_manager.cpp) - if(TARGET test_intra_process_manager) - ament_target_dependencies(test_intra_process_manager - "rcl" - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_intra_process_manager ${PROJECT_NAME}) - endif() - ament_add_gtest(test_ring_buffer_implementation test/test_ring_buffer_implementation.cpp) - if(TARGET test_ring_buffer_implementation) - ament_target_dependencies(test_ring_buffer_implementation - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_ring_buffer_implementation ${PROJECT_NAME}) - endif() - ament_add_gtest(test_intra_process_buffer test/test_intra_process_buffer.cpp) - if(TARGET test_intra_process_buffer) - ament_target_dependencies(test_intra_process_buffer - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_intra_process_buffer ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_loaned_message test/test_loaned_message.cpp) - ament_target_dependencies(test_loaned_message - "test_msgs" - ) - target_link_libraries(test_loaned_message ${PROJECT_NAME}) - - ament_add_gtest(test_node test/test_node.cpp TIMEOUT 240) - if(TARGET test_node) - ament_target_dependencies(test_node - "rcl_interfaces" - "rcpputils" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "test_msgs" - ) - target_link_libraries(test_node ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_node_interfaces__get_node_interfaces - test/node_interfaces/test_get_node_interfaces.cpp) - if(TARGET test_node_interfaces__get_node_interfaces) - target_link_libraries(test_node_interfaces__get_node_interfaces ${PROJECT_NAME}) - endif() - - # TODO(wjwwood): reenable these build failure tests when I can get Jenkins to ignore their output - # rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ref_rclcpp_node - # test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp) - # target_link_libraries(build_failure__get_node_topics_interface_const_ref_rclcpp_node - # ${PROJECT_NAME}) - - # rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ptr_rclcpp_node - # test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp) - # target_link_libraries(build_failure__get_node_topics_interface_const_ptr_rclcpp_node - # ${PROJECT_NAME}) - - # rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ref_wrapped_node - # test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp) - # target_link_libraries(build_failure__get_node_topics_interface_const_ref_rclcpp_node - # ${PROJECT_NAME}) - - # rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ptr_wrapped_node - # test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp) - # target_link_libraries(build_failure__get_node_topics_interface_const_ptr_rclcpp_node - # ${PROJECT_NAME}) - - ament_add_gtest(test_node_global_args test/test_node_global_args.cpp) - if(TARGET test_node_global_args) - ament_target_dependencies(test_node_global_args - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_node_global_args ${PROJECT_NAME}) - endif() - ament_add_gtest(test_node_options test/test_node_options.cpp) - if(TARGET test_node_options) - ament_target_dependencies(test_node_options "rcl") - target_link_libraries(test_node_options ${PROJECT_NAME}) - endif() - ament_add_gtest(test_parameter_client test/test_parameter_client.cpp) - if(TARGET test_parameter_client) - ament_target_dependencies(test_parameter_client - "rcl_interfaces" - ) - target_link_libraries(test_parameter_client ${PROJECT_NAME}) - endif() - ament_add_gtest(test_parameter_events_filter test/test_parameter_events_filter.cpp) - if(TARGET test_parameter_events_filter) - ament_target_dependencies(test_parameter_events_filter - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_parameter_events_filter ${PROJECT_NAME}) - endif() - ament_add_gtest(test_parameter test/test_parameter.cpp) - if(TARGET test_parameter) - ament_target_dependencies(test_parameter - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_parameter ${PROJECT_NAME}) - endif() - ament_add_gtest(test_parameter_map test/test_parameter_map.cpp) - if(TARGET test_parameter_map) - target_link_libraries(test_parameter_map ${PROJECT_NAME}) - endif() - ament_add_gtest(test_publisher test/test_publisher.cpp) - if(TARGET test_publisher) - ament_target_dependencies(test_publisher - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "test_msgs" - ) - target_link_libraries(test_publisher ${PROJECT_NAME}) - endif() - ament_add_gtest(test_publisher_subscription_count_api test/test_publisher_subscription_count_api.cpp) - if(TARGET test_publisher_subscription_count_api) - ament_target_dependencies(test_publisher_subscription_count_api - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "test_msgs" - ) - target_link_libraries(test_publisher_subscription_count_api ${PROJECT_NAME}) - endif() - ament_add_gtest(test_qos test/test_qos.cpp) - if(TARGET test_qos) - ament_target_dependencies(test_qos - "rmw" - ) - target_link_libraries(test_qos - ${PROJECT_NAME} - ) - endif() - ament_add_gtest(test_qos_event test/test_qos_event.cpp) - if(TARGET test_qos_event) - ament_target_dependencies(test_qos_event - "rmw" - "test_msgs" - ) - target_link_libraries(test_qos_event - ${PROJECT_NAME} - ) - endif() - ament_add_gtest(test_rate test/test_rate.cpp) - if(TARGET test_rate) - ament_target_dependencies(test_rate - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_rate - ${PROJECT_NAME} - ) - endif() - ament_add_gtest(test_serialized_message_allocator test/test_serialized_message_allocator.cpp) - if(TARGET test_serialized_message_allocator) - ament_target_dependencies(test_serialized_message_allocator - test_msgs - ) - target_link_libraries(test_serialized_message_allocator - ${PROJECT_NAME} - ) - endif() - ament_add_gtest(test_serialized_message test/test_serialized_message.cpp) - if(TARGET test_serialized_message) - ament_target_dependencies(test_serialized_message - test_msgs - ) - target_link_libraries(test_serialized_message - ${PROJECT_NAME} - ) - endif() - ament_add_gtest(test_service test/test_service.cpp) - if(TARGET test_service) - ament_target_dependencies(test_service - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - ) - target_link_libraries(test_service ${PROJECT_NAME}) - endif() - ament_add_gtest(test_subscription test/test_subscription.cpp) - if(TARGET test_subscription) - ament_target_dependencies(test_subscription - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "test_msgs" - ) - target_link_libraries(test_subscription ${PROJECT_NAME}) - endif() - ament_add_gtest(test_subscription_publisher_count_api test/test_subscription_publisher_count_api.cpp) - if(TARGET test_subscription_publisher_count_api) - ament_target_dependencies(test_subscription_publisher_count_api - "rcl_interfaces" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "test_msgs" - ) - target_link_libraries(test_subscription_publisher_count_api ${PROJECT_NAME}) - endif() - ament_add_gtest(test_subscription_traits test/test_subscription_traits.cpp) - if(TARGET test_subscription_traits) - ament_target_dependencies(test_subscription_traits - "rcl" - "test_msgs" - ) - target_link_libraries(test_subscription_traits ${PROJECT_NAME}) - endif() - ament_add_gtest(test_find_weak_nodes test/test_find_weak_nodes.cpp) - if(TARGET test_find_weak_nodes) - ament_target_dependencies(test_find_weak_nodes - "rcl" - ) - target_link_libraries(test_find_weak_nodes ${PROJECT_NAME}) - endif() - - set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}") - if(WIN32) - set(append_library_dirs "${append_library_dirs}/$") - endif() - - ament_add_gtest(test_externally_defined_services test/test_externally_defined_services.cpp) - ament_target_dependencies(test_externally_defined_services - "rcl" - "test_msgs" - ) - target_link_libraries(test_externally_defined_services ${PROJECT_NAME}) - - ament_add_gtest(test_duration test/test_duration.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_duration) - ament_target_dependencies(test_duration - "rcl") - target_link_libraries(test_duration ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_executor test/test_executor.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_executor) - ament_target_dependencies(test_executor - "rcl") - target_link_libraries(test_executor ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_logger test/test_logger.cpp) - target_link_libraries(test_logger ${PROJECT_NAME}) - - ament_add_gmock(test_logging test/test_logging.cpp) - target_link_libraries(test_logging ${PROJECT_NAME}) - - ament_add_gtest(test_time test/test_time.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_time) - ament_target_dependencies(test_time - "rcl") - target_link_libraries(test_time ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_timer test/test_timer.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_timer) - ament_target_dependencies(test_timer - "rcl") - target_link_libraries(test_timer ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_time_source test/test_time_source.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_time_source) - ament_target_dependencies(test_time_source - "rcl") - target_link_libraries(test_time_source ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_utilities test/test_utilities.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_utilities) - ament_target_dependencies(test_utilities - "rcl") - target_link_libraries(test_utilities ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_init test/test_init.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_init) - ament_target_dependencies(test_init - "rcl") - target_link_libraries(test_init ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_interface_traits test/test_interface_traits.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_interface_traits) - ament_target_dependencies(test_interface_traits - "rcl") - target_link_libraries(test_interface_traits ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_multi_threaded_executor test/executors/test_multi_threaded_executor.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_multi_threaded_executor) - ament_target_dependencies(test_multi_threaded_executor - "rcl") - target_link_libraries(test_multi_threaded_executor ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_guard_condition test/test_guard_condition.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_guard_condition) - target_link_libraries(test_guard_condition ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_wait_set test/test_wait_set.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}") - if(TARGET test_wait_set) - ament_target_dependencies(test_wait_set "test_msgs") - target_link_libraries(test_wait_set ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_subscription_topic_statistics test/topic_statistics/test_subscription_topic_statistics.cpp - APPEND_LIBRARY_DIRS "${append_library_dirs}" - ) - if(TARGET test_subscription_topic_statistics) - ament_target_dependencies(test_subscription_topic_statistics - "builtin_interfaces" - "libstatistics_collector" - "rcl_interfaces" - "rcutils" - "rmw" - "rosidl_runtime_cpp" - "rosidl_typesupport_cpp" - "statistics_msgs" - "test_msgs") - rosidl_target_interfaces(test_subscription_topic_statistics ${PROJECT_NAME}_test_msgs "rosidl_typesupport_cpp") - target_link_libraries(test_subscription_topic_statistics ${PROJECT_NAME}) - endif() - - ament_add_gtest(test_subscription_options test/test_subscription_options.cpp) - if(TARGET test_subscription_options) - ament_target_dependencies(test_subscription_options "rcl") - target_link_libraries(test_subscription_options ${PROJECT_NAME}) - endif() - - # Install test resources - install( - DIRECTORY test/resources - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/test) + add_subdirectory(test) endif() ament_package() diff --git a/rclcpp/test/CMakeLists.txt b/rclcpp/test/CMakeLists.txt new file mode 100644 index 0000000000..d500f3e58a --- /dev/null +++ b/rclcpp/test/CMakeLists.txt @@ -0,0 +1,434 @@ +find_package(ament_cmake_gtest REQUIRED) + +find_package(rmw_implementation_cmake REQUIRED) +find_package(rosidl_default_generators REQUIRED) + +find_package(test_msgs REQUIRED) + +include(cmake/rclcpp_add_build_failure_test.cmake) + +add_definitions(-DTEST_RESOURCES_DIRECTORY="${CMAKE_CURRENT_BINARY_DIR}/resources") + +rosidl_generate_interfaces(${PROJECT_NAME}_test_msgs + msg/Header.msg + msg/MessageWithHeader.msg + DEPENDENCIES builtin_interfaces + LIBRARY_NAME ${PROJECT_NAME} + SKIP_INSTALL +) + +ament_add_gtest(test_client rclcpp/test_client.cpp) +if(TARGET test_client) + ament_target_dependencies(test_client + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_client ${PROJECT_NAME}) +endif() +ament_add_gtest(test_create_timer rclcpp/test_create_timer.cpp) +if(TARGET test_create_timer) + ament_target_dependencies(test_create_timer + "rcl_interfaces" + "rmw" + "rcl" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_create_timer ${PROJECT_NAME}) + target_include_directories(test_create_timer PRIVATE rclcpp/) +endif() +ament_add_gtest(test_expand_topic_or_service_name rclcpp/test_expand_topic_or_service_name.cpp) +if(TARGET test_expand_topic_or_service_name) + ament_target_dependencies(test_expand_topic_or_service_name + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_expand_topic_or_service_name ${PROJECT_NAME}) +endif() +ament_add_gtest(test_function_traits rclcpp/test_function_traits.cpp) +if(TARGET test_function_traits) + target_include_directories(test_function_traits PUBLIC ../include) + ament_target_dependencies(test_function_traits + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) +endif() +ament_add_gmock(test_intra_process_manager rclcpp/test_intra_process_manager.cpp) +if(TARGET test_intra_process_manager) + ament_target_dependencies(test_intra_process_manager + "rcl" + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_intra_process_manager ${PROJECT_NAME}) +endif() +ament_add_gtest(test_ring_buffer_implementation rclcpp/test_ring_buffer_implementation.cpp) +if(TARGET test_ring_buffer_implementation) + ament_target_dependencies(test_ring_buffer_implementation + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_ring_buffer_implementation ${PROJECT_NAME}) +endif() +ament_add_gtest(test_intra_process_buffer rclcpp/test_intra_process_buffer.cpp) +if(TARGET test_intra_process_buffer) + ament_target_dependencies(test_intra_process_buffer + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_intra_process_buffer ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_loaned_message rclcpp/test_loaned_message.cpp) +ament_target_dependencies(test_loaned_message + "test_msgs" +) +target_link_libraries(test_loaned_message ${PROJECT_NAME}) + +ament_add_gtest(test_node rclcpp/test_node.cpp TIMEOUT 240) +if(TARGET test_node) + ament_target_dependencies(test_node + "rcl_interfaces" + "rcpputils" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "test_msgs" + ) + target_link_libraries(test_node ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_node_interfaces__get_node_interfaces + rclcpp/node_interfaces/test_get_node_interfaces.cpp) +if(TARGET test_node_interfaces__get_node_interfaces) + target_link_libraries(test_node_interfaces__get_node_interfaces ${PROJECT_NAME}) +endif() + +# TODO(wjwwood): reenable these build failure tests when I can get Jenkins to ignore their output +# rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ref_rclcpp_node +# rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp) +# target_link_libraries(build_failure__get_node_topics_interface_const_ref_rclcpp_node +# ${PROJECT_NAME}) + +# rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ptr_rclcpp_node +# rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp) +# target_link_libraries(build_failure__get_node_topics_interface_const_ptr_rclcpp_node +# ${PROJECT_NAME}) + +# rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ref_wrapped_node +# rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp) +# target_link_libraries(build_failure__get_node_topics_interface_const_ref_rclcpp_node +# ${PROJECT_NAME}) + +# rclcpp_add_build_failure_test(build_failure__get_node_topics_interface_const_ptr_wrapped_node +# rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp) +# target_link_libraries(build_failure__get_node_topics_interface_const_ptr_rclcpp_node +# ${PROJECT_NAME}) + +ament_add_gtest(test_node_global_args rclcpp/test_node_global_args.cpp) +if(TARGET test_node_global_args) + ament_target_dependencies(test_node_global_args + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_node_global_args ${PROJECT_NAME}) +endif() +ament_add_gtest(test_node_options rclcpp/test_node_options.cpp) +if(TARGET test_node_options) + ament_target_dependencies(test_node_options "rcl") + target_link_libraries(test_node_options ${PROJECT_NAME}) +endif() +ament_add_gtest(test_parameter_client rclcpp/test_parameter_client.cpp) +if(TARGET test_parameter_client) + ament_target_dependencies(test_parameter_client + "rcl_interfaces" + ) + target_link_libraries(test_parameter_client ${PROJECT_NAME}) +endif() +ament_add_gtest(test_parameter_events_filter rclcpp/test_parameter_events_filter.cpp) +if(TARGET test_parameter_events_filter) + ament_target_dependencies(test_parameter_events_filter + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_parameter_events_filter ${PROJECT_NAME}) +endif() +ament_add_gtest(test_parameter rclcpp/test_parameter.cpp) +if(TARGET test_parameter) + ament_target_dependencies(test_parameter + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_parameter ${PROJECT_NAME}) +endif() +ament_add_gtest(test_parameter_map rclcpp/test_parameter_map.cpp) +if(TARGET test_parameter_map) + target_link_libraries(test_parameter_map ${PROJECT_NAME}) +endif() +ament_add_gtest(test_publisher rclcpp/test_publisher.cpp) +if(TARGET test_publisher) + ament_target_dependencies(test_publisher + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "test_msgs" + ) + target_link_libraries(test_publisher ${PROJECT_NAME}) +endif() +ament_add_gtest(test_publisher_subscription_count_api rclcpp/test_publisher_subscription_count_api.cpp) +if(TARGET test_publisher_subscription_count_api) + ament_target_dependencies(test_publisher_subscription_count_api + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "test_msgs" + ) + target_link_libraries(test_publisher_subscription_count_api ${PROJECT_NAME}) +endif() +ament_add_gtest(test_qos rclcpp/test_qos.cpp) +if(TARGET test_qos) + ament_target_dependencies(test_qos + "rmw" + ) + target_link_libraries(test_qos + ${PROJECT_NAME} + ) +endif() +ament_add_gtest(test_qos_event rclcpp/test_qos_event.cpp) +if(TARGET test_qos_event) + ament_target_dependencies(test_qos_event + "rmw" + "test_msgs" + ) + target_link_libraries(test_qos_event + ${PROJECT_NAME} + ) +endif() +ament_add_gtest(test_rate rclcpp/test_rate.cpp) +if(TARGET test_rate) + ament_target_dependencies(test_rate + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_rate + ${PROJECT_NAME} + ) +endif() +ament_add_gtest(test_serialized_message_allocator rclcpp/test_serialized_message_allocator.cpp) +if(TARGET test_serialized_message_allocator) + ament_target_dependencies(test_serialized_message_allocator + test_msgs + ) + target_link_libraries(test_serialized_message_allocator + ${PROJECT_NAME} + ) +endif() +ament_add_gtest(test_serialized_message rclcpp/test_serialized_message.cpp) +if(TARGET test_serialized_message) + ament_target_dependencies(test_serialized_message + test_msgs + ) + target_link_libraries(test_serialized_message + ${PROJECT_NAME} + ) +endif() +ament_add_gtest(test_service rclcpp/test_service.cpp) +if(TARGET test_service) + ament_target_dependencies(test_service + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + ) + target_link_libraries(test_service ${PROJECT_NAME}) +endif() +ament_add_gtest(test_subscription rclcpp/test_subscription.cpp) +if(TARGET test_subscription) + ament_target_dependencies(test_subscription + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "test_msgs" + ) + target_link_libraries(test_subscription ${PROJECT_NAME}) +endif() +ament_add_gtest(test_subscription_publisher_count_api rclcpp/test_subscription_publisher_count_api.cpp) +if(TARGET test_subscription_publisher_count_api) + ament_target_dependencies(test_subscription_publisher_count_api + "rcl_interfaces" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "test_msgs" + ) + target_link_libraries(test_subscription_publisher_count_api ${PROJECT_NAME}) +endif() +ament_add_gtest(test_subscription_traits rclcpp/test_subscription_traits.cpp) +if(TARGET test_subscription_traits) + ament_target_dependencies(test_subscription_traits + "rcl" + "test_msgs" + ) + target_link_libraries(test_subscription_traits ${PROJECT_NAME}) +endif() +ament_add_gtest(test_find_weak_nodes rclcpp/test_find_weak_nodes.cpp) +if(TARGET test_find_weak_nodes) + ament_target_dependencies(test_find_weak_nodes + "rcl" + ) + target_link_libraries(test_find_weak_nodes ${PROJECT_NAME}) +endif() + +set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}") +if(WIN32) + set(append_library_dirs "${append_library_dirs}/$") +endif() + +ament_add_gtest(test_externally_defined_services rclcpp/test_externally_defined_services.cpp) +ament_target_dependencies(test_externally_defined_services + "rcl" + "test_msgs" +) +target_link_libraries(test_externally_defined_services ${PROJECT_NAME}) + +ament_add_gtest(test_duration rclcpp/test_duration.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_duration) + ament_target_dependencies(test_duration + "rcl") + target_link_libraries(test_duration ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_executor rclcpp/test_executor.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_executor) + ament_target_dependencies(test_executor + "rcl") + target_link_libraries(test_executor ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_logger rclcpp/test_logger.cpp) +target_link_libraries(test_logger ${PROJECT_NAME}) + +ament_add_gmock(test_logging rclcpp/test_logging.cpp) +target_link_libraries(test_logging ${PROJECT_NAME}) + +ament_add_gtest(test_time rclcpp/test_time.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_time) + ament_target_dependencies(test_time + "rcl") + target_link_libraries(test_time ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_timer rclcpp/test_timer.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_timer) + ament_target_dependencies(test_timer + "rcl") + target_link_libraries(test_timer ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_time_source rclcpp/test_time_source.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_time_source) + ament_target_dependencies(test_time_source + "rcl") + target_link_libraries(test_time_source ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_utilities rclcpp/test_utilities.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_utilities) + ament_target_dependencies(test_utilities + "rcl") + target_link_libraries(test_utilities ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_init rclcpp/test_init.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_init) + ament_target_dependencies(test_init + "rcl") + target_link_libraries(test_init ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_interface_traits rclcpp/test_interface_traits.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_interface_traits) + ament_target_dependencies(test_interface_traits + "rcl") + target_link_libraries(test_interface_traits ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_multi_threaded_executor rclcpp/executors/test_multi_threaded_executor.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_multi_threaded_executor) + ament_target_dependencies(test_multi_threaded_executor + "rcl") + target_link_libraries(test_multi_threaded_executor ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_guard_condition rclcpp/test_guard_condition.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_guard_condition) + target_link_libraries(test_guard_condition ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_wait_set rclcpp/test_wait_set.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}") +if(TARGET test_wait_set) + ament_target_dependencies(test_wait_set "test_msgs") + target_link_libraries(test_wait_set ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_subscription_topic_statistics rclcpp/topic_statistics/test_subscription_topic_statistics.cpp + APPEND_LIBRARY_DIRS "${append_library_dirs}" +) +if(TARGET test_subscription_topic_statistics) + ament_target_dependencies(test_subscription_topic_statistics + "builtin_interfaces" + "libstatistics_collector" + "rcl_interfaces" + "rcutils" + "rmw" + "rosidl_runtime_cpp" + "rosidl_typesupport_cpp" + "statistics_msgs" + "test_msgs") + rosidl_target_interfaces(test_subscription_topic_statistics ${PROJECT_NAME}_test_msgs "rosidl_typesupport_cpp") + target_link_libraries(test_subscription_topic_statistics ${PROJECT_NAME}) +endif() + +ament_add_gtest(test_subscription_options rclcpp/test_subscription_options.cpp) +if(TARGET test_subscription_options) + ament_target_dependencies(test_subscription_options "rcl") + target_link_libraries(test_subscription_options ${PROJECT_NAME}) +endif() + +# Install test resources +install( + DIRECTORY resources + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/rclcpp/cmake/rclcpp_add_build_failure_test.cmake b/rclcpp/test/cmake/rclcpp_add_build_failure_test.cmake similarity index 100% rename from rclcpp/cmake/rclcpp_add_build_failure_test.cmake rename to rclcpp/test/cmake/rclcpp_add_build_failure_test.cmake diff --git a/rclcpp/test/executors/test_multi_threaded_executor.cpp b/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp similarity index 100% rename from rclcpp/test/executors/test_multi_threaded_executor.cpp rename to rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp diff --git a/rclcpp/test/node_interfaces/node_wrapper.hpp b/rclcpp/test/rclcpp/node_interfaces/node_wrapper.hpp similarity index 93% rename from rclcpp/test/node_interfaces/node_wrapper.hpp rename to rclcpp/test/rclcpp/node_interfaces/node_wrapper.hpp index f4319f545d..b1413e1f05 100644 --- a/rclcpp/test/node_interfaces/node_wrapper.hpp +++ b/rclcpp/test/rclcpp/node_interfaces/node_wrapper.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NODE_INTERFACES__NODE_WRAPPER_HPP_ -#define NODE_INTERFACES__NODE_WRAPPER_HPP_ +#ifndef RCLCPP__NODE_INTERFACES__NODE_WRAPPER_HPP_ +#define RCLCPP__NODE_INTERFACES__NODE_WRAPPER_HPP_ #include #include @@ -61,4 +61,4 @@ class NodeWrapper rclcpp::Node::SharedPtr node; }; -#endif // NODE_INTERFACES__NODE_WRAPPER_HPP_ +#endif // RCLCPP__NODE_INTERFACES__NODE_WRAPPER_HPP_ diff --git a/rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp b/rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp similarity index 100% rename from rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp rename to rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_rclcpp_node.cpp diff --git a/rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp b/rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp similarity index 100% rename from rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp rename to rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ptr_wrapped_node.cpp diff --git a/rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp b/rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp similarity index 100% rename from rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp rename to rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_rclcpp_node.cpp diff --git a/rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp b/rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp similarity index 100% rename from rclcpp/test/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp rename to rclcpp/test/rclcpp/node_interfaces/test_does_not_compile/get_node_topics_interface_const_ref_wrapped_node.cpp diff --git a/rclcpp/test/node_interfaces/test_get_node_interfaces.cpp b/rclcpp/test/rclcpp/node_interfaces/test_get_node_interfaces.cpp similarity index 100% rename from rclcpp/test/node_interfaces/test_get_node_interfaces.cpp rename to rclcpp/test/rclcpp/node_interfaces/test_get_node_interfaces.cpp diff --git a/rclcpp/test/test_client.cpp b/rclcpp/test/rclcpp/test_client.cpp similarity index 100% rename from rclcpp/test/test_client.cpp rename to rclcpp/test/rclcpp/test_client.cpp diff --git a/rclcpp/test/test_create_timer.cpp b/rclcpp/test/rclcpp/test_create_timer.cpp similarity index 100% rename from rclcpp/test/test_create_timer.cpp rename to rclcpp/test/rclcpp/test_create_timer.cpp diff --git a/rclcpp/test/test_duration.cpp b/rclcpp/test/rclcpp/test_duration.cpp similarity index 100% rename from rclcpp/test/test_duration.cpp rename to rclcpp/test/rclcpp/test_duration.cpp diff --git a/rclcpp/test/test_executor.cpp b/rclcpp/test/rclcpp/test_executor.cpp similarity index 100% rename from rclcpp/test/test_executor.cpp rename to rclcpp/test/rclcpp/test_executor.cpp diff --git a/rclcpp/test/test_expand_topic_or_service_name.cpp b/rclcpp/test/rclcpp/test_expand_topic_or_service_name.cpp similarity index 100% rename from rclcpp/test/test_expand_topic_or_service_name.cpp rename to rclcpp/test/rclcpp/test_expand_topic_or_service_name.cpp diff --git a/rclcpp/test/test_externally_defined_services.cpp b/rclcpp/test/rclcpp/test_externally_defined_services.cpp similarity index 100% rename from rclcpp/test/test_externally_defined_services.cpp rename to rclcpp/test/rclcpp/test_externally_defined_services.cpp diff --git a/rclcpp/test/test_find_weak_nodes.cpp b/rclcpp/test/rclcpp/test_find_weak_nodes.cpp similarity index 100% rename from rclcpp/test/test_find_weak_nodes.cpp rename to rclcpp/test/rclcpp/test_find_weak_nodes.cpp diff --git a/rclcpp/test/test_function_traits.cpp b/rclcpp/test/rclcpp/test_function_traits.cpp similarity index 100% rename from rclcpp/test/test_function_traits.cpp rename to rclcpp/test/rclcpp/test_function_traits.cpp diff --git a/rclcpp/test/test_guard_condition.cpp b/rclcpp/test/rclcpp/test_guard_condition.cpp similarity index 100% rename from rclcpp/test/test_guard_condition.cpp rename to rclcpp/test/rclcpp/test_guard_condition.cpp diff --git a/rclcpp/test/test_init.cpp b/rclcpp/test/rclcpp/test_init.cpp similarity index 100% rename from rclcpp/test/test_init.cpp rename to rclcpp/test/rclcpp/test_init.cpp diff --git a/rclcpp/test/test_interface_traits.cpp b/rclcpp/test/rclcpp/test_interface_traits.cpp similarity index 100% rename from rclcpp/test/test_interface_traits.cpp rename to rclcpp/test/rclcpp/test_interface_traits.cpp diff --git a/rclcpp/test/test_intra_process_buffer.cpp b/rclcpp/test/rclcpp/test_intra_process_buffer.cpp similarity index 100% rename from rclcpp/test/test_intra_process_buffer.cpp rename to rclcpp/test/rclcpp/test_intra_process_buffer.cpp diff --git a/rclcpp/test/test_intra_process_manager.cpp b/rclcpp/test/rclcpp/test_intra_process_manager.cpp similarity index 100% rename from rclcpp/test/test_intra_process_manager.cpp rename to rclcpp/test/rclcpp/test_intra_process_manager.cpp diff --git a/rclcpp/test/test_loaned_message.cpp b/rclcpp/test/rclcpp/test_loaned_message.cpp similarity index 100% rename from rclcpp/test/test_loaned_message.cpp rename to rclcpp/test/rclcpp/test_loaned_message.cpp diff --git a/rclcpp/test/test_logger.cpp b/rclcpp/test/rclcpp/test_logger.cpp similarity index 100% rename from rclcpp/test/test_logger.cpp rename to rclcpp/test/rclcpp/test_logger.cpp diff --git a/rclcpp/test/test_logging.cpp b/rclcpp/test/rclcpp/test_logging.cpp similarity index 100% rename from rclcpp/test/test_logging.cpp rename to rclcpp/test/rclcpp/test_logging.cpp diff --git a/rclcpp/test/test_node.cpp b/rclcpp/test/rclcpp/test_node.cpp similarity index 100% rename from rclcpp/test/test_node.cpp rename to rclcpp/test/rclcpp/test_node.cpp diff --git a/rclcpp/test/test_node_global_args.cpp b/rclcpp/test/rclcpp/test_node_global_args.cpp similarity index 100% rename from rclcpp/test/test_node_global_args.cpp rename to rclcpp/test/rclcpp/test_node_global_args.cpp diff --git a/rclcpp/test/test_node_options.cpp b/rclcpp/test/rclcpp/test_node_options.cpp similarity index 100% rename from rclcpp/test/test_node_options.cpp rename to rclcpp/test/rclcpp/test_node_options.cpp diff --git a/rclcpp/test/test_parameter.cpp b/rclcpp/test/rclcpp/test_parameter.cpp similarity index 100% rename from rclcpp/test/test_parameter.cpp rename to rclcpp/test/rclcpp/test_parameter.cpp diff --git a/rclcpp/test/test_parameter_client.cpp b/rclcpp/test/rclcpp/test_parameter_client.cpp similarity index 100% rename from rclcpp/test/test_parameter_client.cpp rename to rclcpp/test/rclcpp/test_parameter_client.cpp diff --git a/rclcpp/test/test_parameter_events_filter.cpp b/rclcpp/test/rclcpp/test_parameter_events_filter.cpp similarity index 100% rename from rclcpp/test/test_parameter_events_filter.cpp rename to rclcpp/test/rclcpp/test_parameter_events_filter.cpp diff --git a/rclcpp/test/test_parameter_map.cpp b/rclcpp/test/rclcpp/test_parameter_map.cpp similarity index 100% rename from rclcpp/test/test_parameter_map.cpp rename to rclcpp/test/rclcpp/test_parameter_map.cpp diff --git a/rclcpp/test/test_publisher.cpp b/rclcpp/test/rclcpp/test_publisher.cpp similarity index 100% rename from rclcpp/test/test_publisher.cpp rename to rclcpp/test/rclcpp/test_publisher.cpp diff --git a/rclcpp/test/test_publisher_subscription_count_api.cpp b/rclcpp/test/rclcpp/test_publisher_subscription_count_api.cpp similarity index 100% rename from rclcpp/test/test_publisher_subscription_count_api.cpp rename to rclcpp/test/rclcpp/test_publisher_subscription_count_api.cpp diff --git a/rclcpp/test/test_qos.cpp b/rclcpp/test/rclcpp/test_qos.cpp similarity index 100% rename from rclcpp/test/test_qos.cpp rename to rclcpp/test/rclcpp/test_qos.cpp diff --git a/rclcpp/test/test_qos_event.cpp b/rclcpp/test/rclcpp/test_qos_event.cpp similarity index 100% rename from rclcpp/test/test_qos_event.cpp rename to rclcpp/test/rclcpp/test_qos_event.cpp diff --git a/rclcpp/test/test_rate.cpp b/rclcpp/test/rclcpp/test_rate.cpp similarity index 100% rename from rclcpp/test/test_rate.cpp rename to rclcpp/test/rclcpp/test_rate.cpp diff --git a/rclcpp/test/test_ring_buffer_implementation.cpp b/rclcpp/test/rclcpp/test_ring_buffer_implementation.cpp similarity index 100% rename from rclcpp/test/test_ring_buffer_implementation.cpp rename to rclcpp/test/rclcpp/test_ring_buffer_implementation.cpp diff --git a/rclcpp/test/test_serialized_message.cpp b/rclcpp/test/rclcpp/test_serialized_message.cpp similarity index 100% rename from rclcpp/test/test_serialized_message.cpp rename to rclcpp/test/rclcpp/test_serialized_message.cpp diff --git a/rclcpp/test/test_serialized_message_allocator.cpp b/rclcpp/test/rclcpp/test_serialized_message_allocator.cpp similarity index 100% rename from rclcpp/test/test_serialized_message_allocator.cpp rename to rclcpp/test/rclcpp/test_serialized_message_allocator.cpp diff --git a/rclcpp/test/test_service.cpp b/rclcpp/test/rclcpp/test_service.cpp similarity index 100% rename from rclcpp/test/test_service.cpp rename to rclcpp/test/rclcpp/test_service.cpp diff --git a/rclcpp/test/test_subscription.cpp b/rclcpp/test/rclcpp/test_subscription.cpp similarity index 100% rename from rclcpp/test/test_subscription.cpp rename to rclcpp/test/rclcpp/test_subscription.cpp diff --git a/rclcpp/test/test_subscription_options.cpp b/rclcpp/test/rclcpp/test_subscription_options.cpp similarity index 100% rename from rclcpp/test/test_subscription_options.cpp rename to rclcpp/test/rclcpp/test_subscription_options.cpp diff --git a/rclcpp/test/test_subscription_publisher_count_api.cpp b/rclcpp/test/rclcpp/test_subscription_publisher_count_api.cpp similarity index 100% rename from rclcpp/test/test_subscription_publisher_count_api.cpp rename to rclcpp/test/rclcpp/test_subscription_publisher_count_api.cpp diff --git a/rclcpp/test/test_subscription_traits.cpp b/rclcpp/test/rclcpp/test_subscription_traits.cpp similarity index 100% rename from rclcpp/test/test_subscription_traits.cpp rename to rclcpp/test/rclcpp/test_subscription_traits.cpp diff --git a/rclcpp/test/test_time.cpp b/rclcpp/test/rclcpp/test_time.cpp similarity index 100% rename from rclcpp/test/test_time.cpp rename to rclcpp/test/rclcpp/test_time.cpp diff --git a/rclcpp/test/test_time_source.cpp b/rclcpp/test/rclcpp/test_time_source.cpp similarity index 100% rename from rclcpp/test/test_time_source.cpp rename to rclcpp/test/rclcpp/test_time_source.cpp diff --git a/rclcpp/test/test_timer.cpp b/rclcpp/test/rclcpp/test_timer.cpp similarity index 100% rename from rclcpp/test/test_timer.cpp rename to rclcpp/test/rclcpp/test_timer.cpp diff --git a/rclcpp/test/test_utilities.cpp b/rclcpp/test/rclcpp/test_utilities.cpp similarity index 100% rename from rclcpp/test/test_utilities.cpp rename to rclcpp/test/rclcpp/test_utilities.cpp diff --git a/rclcpp/test/test_wait_set.cpp b/rclcpp/test/rclcpp/test_wait_set.cpp similarity index 100% rename from rclcpp/test/test_wait_set.cpp rename to rclcpp/test/rclcpp/test_wait_set.cpp diff --git a/rclcpp/test/topic_statistics/test_subscription_topic_statistics.cpp b/rclcpp/test/rclcpp/topic_statistics/test_subscription_topic_statistics.cpp similarity index 100% rename from rclcpp/test/topic_statistics/test_subscription_topic_statistics.cpp rename to rclcpp/test/rclcpp/topic_statistics/test_subscription_topic_statistics.cpp diff --git a/rclcpp/test/topic_statistics/test_topic_stats_utils.hpp b/rclcpp/test/rclcpp/topic_statistics/test_topic_stats_utils.hpp similarity index 95% rename from rclcpp/test/topic_statistics/test_topic_stats_utils.hpp rename to rclcpp/test/rclcpp/topic_statistics/test_topic_stats_utils.hpp index 1399abbaff..ec50d16eaf 100644 --- a/rclcpp/test/topic_statistics/test_topic_stats_utils.hpp +++ b/rclcpp/test/rclcpp/topic_statistics/test_topic_stats_utils.hpp @@ -22,8 +22,8 @@ #include "statistics_msgs/msg/metrics_message.hpp" -#ifndef TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_ -#define TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_ +#ifndef RCLCPP__TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_ +#define RCLCPP__TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_ namespace rclcpp { @@ -149,4 +149,4 @@ class MetricsMessageSubscriber : public rclcpp::Node, public PromiseSetter } // namespace topic_statistics } // namespace rclcpp -#endif // TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_ +#endif // RCLCPP__TOPIC_STATISTICS__TEST_TOPIC_STATS_UTILS_HPP_