Skip to content

Commit

Permalink
refactor(fake_test_node): prefix package and namespace with autoware
Browse files Browse the repository at this point in the history
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
  • Loading branch information
esteve committed Nov 6, 2024
1 parent f0f5736 commit 3987d02
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ common/autoware_ad_api_specs/** isamu.takagi@tier4.jp ryohsuke.mitsudome@tier4.j
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
Expand All @@ -25,7 +26,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/qp_interface/** fumiya.watanabe@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_
#define FAKE_TEST_NODE__FAKE_TEST_NODE_HPP_

#include <fake_test_node/visibility_control.hpp>
#include <autoware/fake_test_node/visibility_control.hpp>
#include <rclcpp/rclcpp.hpp>

#include <gtest/gtest.h>
Expand All @@ -30,11 +30,7 @@
#include <string>
#include <type_traits>

namespace autoware
{
namespace tools
{
namespace testing
namespace autoware::fake_test_node
{

///
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>fake_test_node</name>
<name>autoware_fake_test_node</name>
<version>1.0.0</version>
<description>A fake node that we can use in the integration-like cpp tests.</description>
<maintainer email="opensource@apex.ai">Apex.AI, Inc.</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <memory>
#include <string>

namespace
namespace autoware::fake_test_node
{
constexpr auto kSpinThread = false;
constexpr auto kArgc = 0;
Expand All @@ -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());
Expand Down Expand Up @@ -76,6 +67,4 @@ void FakeTestNode::TearDown()
tear_down();
}

} // namespace testing
} // namespace tools
} // namespace autoware
} // namespace autoware::fake_test_node
2 changes: 1 addition & 1 deletion control/autoware_trajectory_follower_node/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_index_python</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_fake_test_node</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>autoware_testing</test_depend>
<test_depend>fake_test_node</test_depend>
<test_depend>ros_testing</test_depend>

<export>
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_path_optimizer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>autoware_testing</test_depend>
<test_depend>fake_test_node</test_depend>
<test_depend>autoware_fake_test_node</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_path_smoother/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>autoware_testing</test_depend>
<test_depend>fake_test_node</test_depend>
<test_depend>autoware_fake_test_node</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
<test_depend>autoware_testing</test_depend>
<test_depend>fake_test_node</test_depend>
<test_depend>autoware_fake_test_node</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit 3987d02

Please sign in to comment.