Skip to content

Commit

Permalink
Merge branch 'fix/grid_map_code_coverage' into 'master'
Browse files Browse the repository at this point in the history
[grid_map_*] Added test coverage macros

GitOrigin-RevId: bf45cb1ee9c9c52707e7316070ef191116c438fa
  • Loading branch information
YoshuaNavaANYbotics authored and anybotics-sync-runner committed Jul 30, 2020
1 parent c796c48 commit 270a9cc
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 0 deletions.
12 changes: 12 additions & 0 deletions grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,15 @@ endif()
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_core/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<depend>eigen</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>
12 changes: 12 additions & 0 deletions grid_map_costmap_2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,15 @@ endif()
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${catkin_LIBRARIES})
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_costmap_2d/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
<depend>grid_map_core</depend>
<depend>costmap_2d</depend>
<depend>tf</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>
11 changes: 11 additions & 0 deletions grid_map_cv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,14 @@ if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_cv/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<depend>grid_map_core</depend>
<depend>cv_bridge</depend>
<depend>filters</depend>
<test_depend>cmake_code_coverage</test_depend>
<export>
<filters plugin="${prefix}/filter_plugins.xml" />
</export>
Expand Down
12 changes: 12 additions & 0 deletions grid_map_octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,15 @@ if(TARGET ${PROJECT_NAME}-test)
${OCTOMAP_LIBRARIES}
)
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_octomap/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
<buildtool_depend>catkin</buildtool_depend>
<depend>grid_map_core</depend>
<depend>octomap</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>
11 changes: 11 additions & 0 deletions grid_map_pcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,14 @@ if(TARGET ${PROJECT_NAME}-test)
${catkin_LIBRARIES})
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_pcl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
<depend>pcl_ros</depend>
<depend>roscpp</depend>
<depend>yaml-cpp</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>
12 changes: 12 additions & 0 deletions grid_map_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,15 @@ endif()
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
<depend>rosbag</depend>
<depend>tf</depend>
<depend>visualization_msgs</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>
12 changes: 12 additions & 0 deletions grid_map_sdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})

endif()

##################
# Code_coverage ##
##################

find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
${PROJECT_NAME}-test
)
endif(cmake_code_coverage_FOUND)
1 change: 1 addition & 0 deletions grid_map_sdf/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
<buildtool_depend>catkin</buildtool_depend>
<depend>grid_map_core</depend>
<depend>pcl_ros</depend>
<test_depend>cmake_code_coverage</test_depend>
</package>

0 comments on commit 270a9cc

Please sign in to comment.