-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Move `test_components` to own package (#1325) (cherry picked from commit 0bdcd41) --------- Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com> Co-authored-by: Dr. Denis <denis@stoglrobotics.de>
- Loading branch information
1 parent
dc7b7be
commit 9bab433
Showing
14 changed files
with
112 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(hardware_interface_testing LANGUAGES CXX) | ||
|
||
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow) | ||
endif() | ||
|
||
set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
control_msgs | ||
hardware_interface | ||
lifecycle_msgs | ||
pluginlib | ||
rclcpp_lifecycle | ||
ros2_control_test_assets | ||
) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
find_package(${Dependency} REQUIRED) | ||
endforeach() | ||
|
||
add_library(test_components SHARED | ||
test/test_components/test_actuator.cpp | ||
test/test_components/test_sensor.cpp | ||
test/test_components/test_system.cpp | ||
) | ||
ament_target_dependencies(test_components hardware_interface pluginlib ros2_control_test_assets) | ||
install(TARGETS test_components | ||
DESTINATION lib | ||
) | ||
pluginlib_export_plugin_description_file( | ||
hardware_interface test/test_components/test_components.xml) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_cmake_gmock REQUIRED) | ||
|
||
ament_add_gmock(test_resource_manager test/test_resource_manager.cpp) | ||
ament_target_dependencies(test_resource_manager hardware_interface ros2_control_test_assets) | ||
|
||
ament_add_gmock(test_resource_manager_prepare_perform_switch test/test_resource_manager_prepare_perform_switch.cpp) | ||
ament_target_dependencies(test_resource_manager_prepare_perform_switch hardware_interface ros2_control_test_assets) | ||
|
||
endif() | ||
|
||
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# hardware_interface_testing | ||
|
||
This package contains a set of hardware interfaces and controllers that can be used for other | ||
packages to test their functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>hardware_interface_testing</name> | ||
<version>0.0.0</version> | ||
<description>ros2_control hardware interface testing</description> | ||
<maintainer email="bence.magyar.robotics@gmail.com">Bence Magyar</maintainer> | ||
<maintainer email="denis@stoglrobotics.de">Denis Štogl</maintainer> | ||
<maintainer email="christoph.froehlich@ait.ac.at">Christoph Froehlich</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>control_msgs</depend> | ||
<depend>hardware_interface</depend> | ||
<depend>lifecycle_msgs</depend> | ||
<depend>pluginlib</depend> | ||
<depend>rclcpp_lifecycle</depend> | ||
<depend>ros2_control_test_assets</depend> | ||
|
||
<test_depend>ament_cmake_gmock</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.