From 50655b55e84f1e9d9b615f1b0559aa1223d3c288 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Wed, 6 Nov 2024 13:56:45 +0100 Subject: [PATCH] refactor(fake_test_node): prefix package and namespace with autoware Signed-off-by: Esteve Fernandez --- .github/CODEOWNERS | 2 +- common/.pages | 2 +- .../CHANGELOG.rst | 0 .../CMakeLists.txt | 8 ++++---- .../design/fake_test_node-design.md | 0 .../fake_test_node/fake_test_node.hpp | 18 ++++++------------ .../fake_test_node/visibility_control.hpp | 6 +++--- .../package.xml | 2 +- .../src/fake_test_node.cpp | 17 +++-------------- .../test/test_fake_test_node.cpp | 2 +- .../package.xml | 2 +- .../test/test_controller_node.cpp | 2 +- .../test/trajectory_follower_test_utils.hpp | 2 +- planning/autoware_path_optimizer/package.xml | 2 +- planning/autoware_path_smoother/package.xml | 2 +- .../autoware_path_sampler/package.xml | 2 +- 16 files changed, 26 insertions(+), 43 deletions(-) rename common/{fake_test_node => autoware_fake_test_node}/CHANGELOG.rst (100%) rename common/{fake_test_node => autoware_fake_test_node}/CMakeLists.txt (51%) rename common/{fake_test_node => autoware_fake_test_node}/design/fake_test_node-design.md (100%) rename common/{fake_test_node/include => autoware_fake_test_node/include/autoware}/fake_test_node/fake_test_node.hpp (96%) rename common/{fake_test_node/include => autoware_fake_test_node/include/autoware}/fake_test_node/visibility_control.hpp (90%) rename common/{fake_test_node => autoware_fake_test_node}/package.xml (96%) rename common/{fake_test_node => autoware_fake_test_node}/src/fake_test_node.cpp (90%) rename common/{fake_test_node => autoware_fake_test_node}/test/test_fake_test_node.cpp (98%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6e83e2b52fdbe..9ab0d362d4920 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,6 +3,7 @@ common/autoware_adapi_specs/** isamu.takagi@tier4.jp ryohsuke.mitsudome@tier4.jp common/autoware_auto_common/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp common/autoware_component_interface_specs/** isamu.takagi@tier4.jp yukihiro.saito@tier4.jp common/autoware_component_interface_tools/** isamu.takagi@tier4.jp +common/autoware_fake_test_node/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp common/autoware_geography_utils/** koji.minoda@tier4.jp common/autoware_goal_distance_calculator/** taiki.tanaka@tier4.jp common/autoware_grid_map_utils/** maxime.clement@tier4.jp @@ -27,7 +28,6 @@ common/autoware_universe_utils/** mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp common/autoware_vehicle_info_utils/** mamoru.sobue@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp common/bag_time_manager_rviz_plugin/** taiki.tanaka@tier4.jp common/component_interface_utils/** isamu.takagi@tier4.jp yukihiro.saito@tier4.jp -common/fake_test_node/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp common/global_parameter_loader/** ryohsuke.mitsudome@tier4.jp common/glog_component/** takamasa.horibe@tier4.jp common/tier4_adapi_rviz_plugin/** hiroki.ota@tier4.jp isamu.takagi@tier4.jp kosuke.takeuchi@tier4.jp diff --git a/common/.pages b/common/.pages index bba56f6dab486..4b2988b2075bb 100644 --- a/common/.pages +++ b/common/.pages @@ -2,7 +2,7 @@ nav: - 'Introduction': common - 'Testing Libraries': - 'autoware_testing': common/autoware_testing/design/autoware_testing-design - - 'fake_test_node': common/fake_test_node/design/fake_test_node-design + - 'autoware_fake_test_node': common/autoware_fake_test_node/design/fake_test_node-design - 'Test Utils': common/autoware_test_utils - 'Common Libraries': - 'autoware_auto_common': diff --git a/common/fake_test_node/CHANGELOG.rst b/common/autoware_fake_test_node/CHANGELOG.rst similarity index 100% rename from common/fake_test_node/CHANGELOG.rst rename to common/autoware_fake_test_node/CHANGELOG.rst diff --git a/common/fake_test_node/CMakeLists.txt b/common/autoware_fake_test_node/CMakeLists.txt similarity index 51% rename from common/fake_test_node/CMakeLists.txt rename to common/autoware_fake_test_node/CMakeLists.txt index 8ad71df2777f3..1be6cdf51ee00 100644 --- a/common/fake_test_node/CMakeLists.txt +++ b/common/autoware_fake_test_node/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.14) -project(fake_test_node) +project(autoware_fake_test_node) find_package(autoware_cmake REQUIRED) autoware_package() -ament_auto_add_library(fake_test_node SHARED src/fake_test_node.cpp) +ament_auto_add_library(${PROJECT_NAME} SHARED src/fake_test_node.cpp) if(BUILD_TESTING) ament_add_ros_isolated_gtest(test_fake_test_node test/test_fake_test_node.cpp ) - add_dependencies(test_fake_test_node fake_test_node) - target_link_libraries(test_fake_test_node fake_test_node) + add_dependencies(test_fake_test_node ${PROJECT_NAME}) + target_link_libraries(test_fake_test_node ${PROJECT_NAME}) endif() ament_auto_package() diff --git a/common/fake_test_node/design/fake_test_node-design.md b/common/autoware_fake_test_node/design/fake_test_node-design.md similarity index 100% rename from common/fake_test_node/design/fake_test_node-design.md rename to common/autoware_fake_test_node/design/fake_test_node-design.md diff --git a/common/fake_test_node/include/fake_test_node/fake_test_node.hpp b/common/autoware_fake_test_node/include/autoware/fake_test_node/fake_test_node.hpp similarity index 96% rename from common/fake_test_node/include/fake_test_node/fake_test_node.hpp rename to common/autoware_fake_test_node/include/autoware/fake_test_node/fake_test_node.hpp index 9f7fee89776b3..40d45f0689283 100644 --- a/common/fake_test_node/include/fake_test_node/fake_test_node.hpp +++ b/common/autoware_fake_test_node/include/autoware/fake_test_node/fake_test_node.hpp @@ -17,10 +17,10 @@ /// \copyright Copyright 2021 Apex.AI, Inc. /// All rights reserved. -#ifndef FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ -#define FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ +#ifndef AUTOWARE__FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ +#define AUTOWARE__FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ -#include +#include #include #include @@ -30,11 +30,7 @@ #include #include -namespace autoware -{ -namespace tools -{ -namespace testing +namespace autoware::fake_test_node { /// @@ -237,8 +233,6 @@ class FAKE_TEST_NODE_PUBLIC FakeTestNode : public detail::FakeNodeCore, public : void TearDown() override; }; -} // namespace testing -} // namespace tools -} // namespace autoware +} // namespace autoware::fake_test_node -#endif // FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ +#endif // AUTOWARE__FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_ diff --git a/common/fake_test_node/include/fake_test_node/visibility_control.hpp b/common/autoware_fake_test_node/include/autoware/fake_test_node/visibility_control.hpp similarity index 90% rename from common/fake_test_node/include/fake_test_node/visibility_control.hpp rename to common/autoware_fake_test_node/include/autoware/fake_test_node/visibility_control.hpp index 62e57eef113f1..d21dbfdbcfc75 100644 --- a/common/fake_test_node/include/fake_test_node/visibility_control.hpp +++ b/common/autoware_fake_test_node/include/autoware/fake_test_node/visibility_control.hpp @@ -17,8 +17,8 @@ /// \copyright Copyright 2021 Apex.AI, Inc. /// All rights reserved. -#ifndef FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ -#define FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ +#ifndef AUTOWARE__FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ +#define AUTOWARE__FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ //////////////////////////////////////////////////////////////////////////////// #if defined(__WIN32) @@ -39,4 +39,4 @@ #error "Unsupported Build Configuration" #endif // defined(__WIN32) -#endif // FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ +#endif // AUTOWARE__FAKE_TEST_NODE__VISIBILITY_CONTROL_HPP_ diff --git a/common/fake_test_node/package.xml b/common/autoware_fake_test_node/package.xml similarity index 96% rename from common/fake_test_node/package.xml rename to common/autoware_fake_test_node/package.xml index ac2cf75a52423..413f359eafbcc 100644 --- a/common/fake_test_node/package.xml +++ b/common/autoware_fake_test_node/package.xml @@ -1,7 +1,7 @@ - fake_test_node + autoware_fake_test_node 0.38.0 A fake node that we can use in the integration-like cpp tests. Apex.AI, Inc. diff --git a/common/fake_test_node/src/fake_test_node.cpp b/common/autoware_fake_test_node/src/fake_test_node.cpp similarity index 90% rename from common/fake_test_node/src/fake_test_node.cpp rename to common/autoware_fake_test_node/src/fake_test_node.cpp index 1704d371c3a5e..75714c0dd5b08 100644 --- a/common/fake_test_node/src/fake_test_node.cpp +++ b/common/autoware_fake_test_node/src/fake_test_node.cpp @@ -17,12 +17,12 @@ /// \copyright Copyright 2021 Apex.AI, Inc. /// All rights reserved. -#include +#include #include #include -namespace +namespace autoware::fake_test_node { constexpr auto kSpinThread = false; constexpr auto kArgc = 0; @@ -34,15 +34,6 @@ std::string sanitize_test_name(const std::string & name) return sanitize_test_name; } -} // namespace - -namespace autoware -{ -namespace tools -{ -namespace testing -{ - void detail::FakeNodeCore::set_up(const std::string & test_name) { ASSERT_FALSE(rclcpp::ok()); @@ -76,6 +67,4 @@ void FakeTestNode::TearDown() tear_down(); } -} // namespace testing -} // namespace tools -} // namespace autoware +} // namespace autoware::fake_test_node diff --git a/common/fake_test_node/test/test_fake_test_node.cpp b/common/autoware_fake_test_node/test/test_fake_test_node.cpp similarity index 98% rename from common/fake_test_node/test/test_fake_test_node.cpp rename to common/autoware_fake_test_node/test/test_fake_test_node.cpp index 77e9294cb48c2..03314dc5b2be8 100644 --- a/common/fake_test_node/test/test_fake_test_node.cpp +++ b/common/autoware_fake_test_node/test/test_fake_test_node.cpp @@ -17,7 +17,7 @@ /// \copyright Copyright 2021 Apex.AI, Inc. /// All rights reserved. -#include +#include #include #include diff --git a/control/autoware_trajectory_follower_node/package.xml b/control/autoware_trajectory_follower_node/package.xml index 848eb7d3b6d10..86a2592ebf5f4 100644 --- a/control/autoware_trajectory_follower_node/package.xml +++ b/control/autoware_trajectory_follower_node/package.xml @@ -40,9 +40,9 @@ ament_index_cpp ament_index_python ament_lint_auto + autoware_fake_test_node autoware_lint_common autoware_testing - fake_test_node ros_testing diff --git a/control/autoware_trajectory_follower_node/test/test_controller_node.cpp b/control/autoware_trajectory_follower_node/test/test_controller_node.cpp index 71813c8a5c5d8..ed8f4c25e4682 100644 --- a/control/autoware_trajectory_follower_node/test/test_controller_node.cpp +++ b/control/autoware_trajectory_follower_node/test/test_controller_node.cpp @@ -13,8 +13,8 @@ // limitations under the License. #include "ament_index_cpp/get_package_share_directory.hpp" +#include "autoware/fake_test_node/fake_test_node.hpp" #include "autoware/trajectory_follower_node/controller_node.hpp" -#include "fake_test_node/fake_test_node.hpp" #include "gtest/gtest.h" #include "rclcpp/rclcpp.hpp" #include "rclcpp/time.hpp" diff --git a/control/autoware_trajectory_follower_node/test/trajectory_follower_test_utils.hpp b/control/autoware_trajectory_follower_node/test/trajectory_follower_test_utils.hpp index 1ccffcaf7f3e3..2fdab912d9214 100644 --- a/control/autoware_trajectory_follower_node/test/trajectory_follower_test_utils.hpp +++ b/control/autoware_trajectory_follower_node/test/trajectory_follower_test_utils.hpp @@ -15,7 +15,7 @@ #ifndef TRAJECTORY_FOLLOWER_TEST_UTILS_HPP_ #define TRAJECTORY_FOLLOWER_TEST_UTILS_HPP_ -#include "fake_test_node/fake_test_node.hpp" +#include "autoware/fake_test_node/fake_test_node.hpp" #include "rclcpp/rclcpp.hpp" #include "rclcpp/time.hpp" #include "tf2_ros/static_transform_broadcaster.h" diff --git a/planning/autoware_path_optimizer/package.xml b/planning/autoware_path_optimizer/package.xml index 5dd763494ada0..7c5b1e68e759a 100644 --- a/planning/autoware_path_optimizer/package.xml +++ b/planning/autoware_path_optimizer/package.xml @@ -34,9 +34,9 @@ ament_cmake_ros ament_index_python ament_lint_auto + autoware_fake_test_node autoware_lint_common autoware_testing - fake_test_node ament_cmake diff --git a/planning/autoware_path_smoother/package.xml b/planning/autoware_path_smoother/package.xml index a9ead8e54d104..6c8b3efec678b 100644 --- a/planning/autoware_path_smoother/package.xml +++ b/planning/autoware_path_smoother/package.xml @@ -31,9 +31,9 @@ ament_cmake_ros ament_index_python ament_lint_auto + autoware_fake_test_node autoware_lint_common autoware_testing - fake_test_node ament_cmake diff --git a/planning/sampling_based_planner/autoware_path_sampler/package.xml b/planning/sampling_based_planner/autoware_path_sampler/package.xml index 188839c805179..c4dafda08a14c 100644 --- a/planning/sampling_based_planner/autoware_path_sampler/package.xml +++ b/planning/sampling_based_planner/autoware_path_sampler/package.xml @@ -34,9 +34,9 @@ ament_cmake_ros ament_index_python ament_lint_auto + autoware_fake_test_node autoware_lint_common autoware_testing - fake_test_node ament_cmake