diff --git a/example_1/CMakeLists.txt b/example_1/CMakeLists.txt index b4499c655..d594efdfa 100644 --- a/example_1/CMakeLists.txt +++ b/example_1/CMakeLists.txt @@ -64,11 +64,18 @@ install(TARGETS ros2_control_demo_example_1 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_1_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_1_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_1_launch test/test_rrbot_launch.py) - ament_add_pytest_test(run_example_1_launch_cli_direct test/test_rrbot_launch_cli_direct.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_launch_cli_direct.py) endif() diff --git a/example_1/package.xml b/example_1/package.xml index f83538634..7d00355ab 100644 --- a/example_1/package.xml +++ b/example_1/package.xml @@ -37,10 +37,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_10/CMakeLists.txt b/example_10/CMakeLists.txt index 449ec6fab..b63cb3661 100644 --- a/example_10/CMakeLists.txt +++ b/example_10/CMakeLists.txt @@ -66,10 +66,17 @@ install(TARGETS ros2_control_demo_example_10 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_10_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_10_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_10_launch test/test_rrbot_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_launch.py) endif() ## EXPORTS diff --git a/example_10/package.xml b/example_10/package.xml index 1967d58c0..ca2e59e92 100644 --- a/example_10/package.xml +++ b/example_10/package.xml @@ -36,10 +36,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_11/CMakeLists.txt b/example_11/CMakeLists.txt index 9a66bcd36..80d4dbda3 100644 --- a/example_11/CMakeLists.txt +++ b/example_11/CMakeLists.txt @@ -64,11 +64,18 @@ install(TARGETS ros2_control_demo_example_11 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_11_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_11_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_11_launch test/test_carlikebot_launch.py) - ament_add_pytest_test(run_example_11_launch_remapped test/test_carlikebot_launch_remapped.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_carlikebot_launch.py) + add_ros_isolated_launch_test(test/test_carlikebot_launch_remapped.py) endif() ## EXPORTS diff --git a/example_11/package.xml b/example_11/package.xml index 9f6433f15..45687138b 100644 --- a/example_11/package.xml +++ b/example_11/package.xml @@ -34,12 +34,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake launch_testing launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_12/CMakeLists.txt b/example_12/CMakeLists.txt index ec887f4c3..2988034e6 100644 --- a/example_12/CMakeLists.txt +++ b/example_12/CMakeLists.txt @@ -102,10 +102,17 @@ install(TARGETS if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_12_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_12_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_12_launch test/test_rrbot_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_launch.py) endif() ## EXPORTS diff --git a/example_12/package.xml b/example_12/package.xml index 0770d5e43..162e36199 100644 --- a/example_12/package.xml +++ b/example_12/package.xml @@ -36,10 +36,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_13/package.xml b/example_13/package.xml index 83d384f0d..4baa3e635 100644 --- a/example_13/package.xml +++ b/example_13/package.xml @@ -33,14 +33,11 @@ ament_cmake_pytest ament_cmake_ros - controller_manager - launch_ros launch_testing_ament_cmake launch_testing launch liburdfdom-tools rclpy - xacro ament_cmake diff --git a/example_14/CMakeLists.txt b/example_14/CMakeLists.txt index 6287ceba6..cc3251624 100644 --- a/example_14/CMakeLists.txt +++ b/example_14/CMakeLists.txt @@ -66,10 +66,17 @@ install(TARGETS ros2_control_demo_example_14 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_14_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_14_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_14_launch test/test_rrbot_modular_actuators_without_feedback_sensors_for_position_feedback_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_modular_actuators_without_feedback_sensors_for_position_feedback_launch.py) endif() ## EXPORTS diff --git a/example_14/package.xml b/example_14/package.xml index eae3d7196..0360c0522 100644 --- a/example_14/package.xml +++ b/example_14/package.xml @@ -33,10 +33,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_15/CMakeLists.txt b/example_15/CMakeLists.txt index 53ab216dc..95199c2e3 100644 --- a/example_15/CMakeLists.txt +++ b/example_15/CMakeLists.txt @@ -26,11 +26,15 @@ install( ) if(BUILD_TESTING) - find_package(ament_cmake_pytest REQUIRED) - - ament_add_pytest_test(test_rrbot_namespace_launch test/test_rrbot_namespace_launch.py) - ament_add_pytest_test(test_multi_controller_manager_launch test/test_multi_controller_manager_launch.py) - + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_rrbot_namespace_launch.py) + add_ros_isolated_launch_test(test/test_multi_controller_manager_launch.py) endif() ## EXPORTS diff --git a/example_15/package.xml b/example_15/package.xml index 4fd784290..832f92804 100644 --- a/example_15/package.xml +++ b/example_15/package.xml @@ -31,10 +31,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_2/CMakeLists.txt b/example_2/CMakeLists.txt index f419e6fde..16c3fda5e 100644 --- a/example_2/CMakeLists.txt +++ b/example_2/CMakeLists.txt @@ -64,10 +64,17 @@ install(TARGETS ros2_control_demo_example_2 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_2_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_2_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_2_launch test/test_diffbot_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_diffbot_launch.py) endif() ## EXPORTS diff --git a/example_2/package.xml b/example_2/package.xml index 4d957da15..20aa23153 100644 --- a/example_2/package.xml +++ b/example_2/package.xml @@ -35,10 +35,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_3/CMakeLists.txt b/example_3/CMakeLists.txt index 703c47f9d..fe8448ae0 100644 --- a/example_3/CMakeLists.txt +++ b/example_3/CMakeLists.txt @@ -64,10 +64,17 @@ install(TARGETS ros2_control_demo_example_3 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_3_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_3_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_3_launch test/test_rrbot_system_multi_interface_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_system_multi_interface_launch.py) endif() ## EXPORTS diff --git a/example_3/package.xml b/example_3/package.xml index ed71316a4..e5ed16ef5 100644 --- a/example_3/package.xml +++ b/example_3/package.xml @@ -35,10 +35,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_4/CMakeLists.txt b/example_4/CMakeLists.txt index 0666fc26d..dcf824e91 100644 --- a/example_4/CMakeLists.txt +++ b/example_4/CMakeLists.txt @@ -64,10 +64,17 @@ install(TARGETS ros2_control_demo_example_4 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_4_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_4_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_4_launch test/test_rrbot_system_with_sensor_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_system_with_sensor_launch.py) endif() ## EXPORTS diff --git a/example_4/package.xml b/example_4/package.xml index ea1fe7345..785e983cd 100644 --- a/example_4/package.xml +++ b/example_4/package.xml @@ -34,10 +34,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_5/CMakeLists.txt b/example_5/CMakeLists.txt index b5e2ed8cd..ccf9ef898 100644 --- a/example_5/CMakeLists.txt +++ b/example_5/CMakeLists.txt @@ -65,10 +65,17 @@ install(TARGETS ros2_control_demo_example_5 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_5_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_5_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_5_launch test/test_rrbot_system_with_external_sensor_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_system_with_external_sensor_launch.py) endif() ## EXPORTS diff --git a/example_5/package.xml b/example_5/package.xml index 0a349f535..f7a25f072 100644 --- a/example_5/package.xml +++ b/example_5/package.xml @@ -34,10 +34,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_6/CMakeLists.txt b/example_6/CMakeLists.txt index da5ce30e4..40e58a90e 100644 --- a/example_6/CMakeLists.txt +++ b/example_6/CMakeLists.txt @@ -64,10 +64,17 @@ install(TARGETS ros2_control_demo_example_6 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_6_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_6_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_6_launch test/test_rrbot_modular_actuators_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_modular_actuators_launch.py) endif() ## EXPORTS diff --git a/example_6/package.xml b/example_6/package.xml index d7c3d7c17..b6914e76e 100644 --- a/example_6/package.xml +++ b/example_6/package.xml @@ -33,10 +33,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_7/CMakeLists.txt b/example_7/CMakeLists.txt index 7ce5fd05e..97304bfc4 100644 --- a/example_7/CMakeLists.txt +++ b/example_7/CMakeLists.txt @@ -99,10 +99,17 @@ install(TARGETS ros2_control_demo_example_7 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_7_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_7_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_7_launch test/test_r6bot_controller_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_r6bot_controller_launch.py) endif() ## EXPORTS diff --git a/example_7/package.xml b/example_7/package.xml index 8f692d719..70940255c 100644 --- a/example_7/package.xml +++ b/example_7/package.xml @@ -42,10 +42,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_8/CMakeLists.txt b/example_8/CMakeLists.txt index 1edeb7888..000f2d018 100644 --- a/example_8/CMakeLists.txt +++ b/example_8/CMakeLists.txt @@ -65,10 +65,17 @@ install(TARGETS ros2_control_demo_example_8 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_8_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_8_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_8_launch test/test_rrbot_transmissions_system_position_only_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_transmissions_system_position_only_launch.py) endif() ## EXPORTS diff --git a/example_8/package.xml b/example_8/package.xml index 43c9c7764..537e4f558 100644 --- a/example_8/package.xml +++ b/example_8/package.xml @@ -36,10 +36,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake diff --git a/example_9/CMakeLists.txt b/example_9/CMakeLists.txt index 3c76f9dd7..c6ec113fe 100644 --- a/example_9/CMakeLists.txt +++ b/example_9/CMakeLists.txt @@ -64,11 +64,18 @@ install(TARGETS ros2_control_demo_example_9 if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(example_9_urdf_xacro test/test_urdf_xacro.py) - ament_add_pytest_test(view_example_9_launch test/test_view_robot_launch.py) - ament_add_pytest_test(run_example_9_launch test/test_rrbot_launch.py) - ament_add_pytest_test(run_example_9_gazebo_launch test/test_rrbot_gazebo_launch.py) + + # Integration (launch) tests + find_package(ament_cmake_ros REQUIRED) + find_package(launch_testing_ament_cmake REQUIRED) + function(add_ros_isolated_launch_test path) + set(RUNNER "${ament_cmake_ros_DIR}/run_test_isolated.py") + add_launch_test("${path}" RUNNER "${RUNNER}" ${ARGN}) + endfunction() + add_ros_isolated_launch_test(test/test_view_robot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_launch.py) + add_ros_isolated_launch_test(test/test_rrbot_gazebo_launch.py) endif() ## EXPORTS diff --git a/example_9/package.xml b/example_9/package.xml index fbf94e432..bd83ab7bc 100644 --- a/example_9/package.xml +++ b/example_9/package.xml @@ -39,10 +39,12 @@ xacro ament_cmake_pytest - controller_manager - launch_testing_ros + ament_cmake_ros + launch_testing_ament_cmake + launch_testing + launch liburdfdom-tools - xacro + rclpy ament_cmake