Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Apr 15, 2024
1 parent 5cb2054 commit 17b1c8d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ur_simulation_gz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ install(DIRECTORY config launch urdf
)

if(BUILD_TESTING)
find_package(launch_testing_ament_cmake)
find_package(ament_cmake_pytest REQUIRED)

add_launch_test(test/test_gz.py
TIMEOUT
180
)
ament_add_pytest_test(description test/test_description.py)
endif()

Expand Down
3 changes: 2 additions & 1 deletion ur_simulation_gz/launch/ur_sim_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def launch_setup(context, *args, **kwargs):
launch_arguments={
"gz_args": IfElseSubstitution(
gazebo_gui, if_value=" -r -v 4 empty.sdf", else_value=" -s -r -v 4 empty.sdf"
)
),
"on_exit_shutdown": "true",
}.items(),
)

Expand Down
4 changes: 4 additions & 0 deletions ur_simulation_gz/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
<exec_depend>xacro</exec_depend>

<test_depend>ament_cmake_pytest</test_depend>
<test_depend>launch_testing_ament_cmake</test_depend>
<test_depend>launch_testing_ros</test_depend>
<test_depend>liburdfdom-tools</test_depend>
<test_depend>xacro</test_depend>

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

0 comments on commit 17b1c8d

Please sign in to comment.