Skip to content

Commit

Permalink
Enabling coverage in robot commander (#787)
Browse files Browse the repository at this point in the history
* Enabling code coverage for robot commander

* Updating package

* fixing cmake

Co-authored-by: Fotios <support@shadowrobot.com>
Co-authored-by: Devops <devops@shadowrobot.com>
  • Loading branch information
3 people authored Nov 21, 2022
1 parent cba8621 commit b6f696c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sr_robot_commander/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,5 @@ if (CATKIN_ENABLE_TESTING)
add_rostest(test/test_hand_commander.test)
add_rostest(test/test_state_saver_no_hardware.test)
add_rostest(test/test_robot_state_exporter.test)
add_rostest(test/test_robot_commander.test)
add_rostest(test/test_robot_commander.test ARGS coverage:=CATKIN_TEST_COVERAGE)
endif ()
5 changes: 4 additions & 1 deletion sr_robot_commander/test/test_robot_commander.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<launch>
<arg name="coverage" default="false"/>
<arg name="pythontest_launch_prefix" value="$(eval 'coverage run' if arg('coverage') else '')"/>

<arg name="sim" default="true"/>
<arg name="gui" default="false"/>
<include file="$(find sr_robot_launch)/launch/sr_ur_arm.launch">
<arg name="sim" value="$(arg sim)"/>
<arg name="gui" value="$(arg gui)"/>
</include>
<test test-name="test_robot_commander" pkg="sr_robot_commander" type="test_robot_commander.py" time-limit="600.0"/>
<test test-name="test_robot_commander" launch-prefix="$(arg pythontest_launch_prefix)" pkg="sr_robot_commander" type="test_robot_commander.py" time-limit="600.0"/>
</launch>

0 comments on commit b6f696c

Please sign in to comment.