Skip to content

Commit

Permalink
Merge branch 'feature/coverage_macros_perception_demo_pkgs' into 'mas…
Browse files Browse the repository at this point in the history
…ter'

[perception demo pkgs] Added unit coverage analysis macros

GitOrigin-RevId: 156263bdddd5c16e679df452ab7936066570f3d1
  • Loading branch information
YoshuaNavaANYbotics authored and anybotics-sync-runner committed Aug 26, 2020
1 parent f5bd2ed commit 6e7fd04
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
32 changes: 32 additions & 0 deletions grid_map_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,35 @@ install(
DIRECTORY config data doc launch rviz scripts
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

##############
## Test ##
##############
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(test_${PROJECT_NAME}
test/empty_test.cpp
)

target_include_directories(test_${PROJECT_NAME}
PRIVATE
include
SYSTEM PUBLIC
${catkin_INCLUDE_DIRS}
)

target_link_libraries(test_${PROJECT_NAME}
${catkin_LIBRARIES}
gtest_main
)

###################
## Code_coverage ##
###################
find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
test_${PROJECT_NAME}
)
endif(cmake_code_coverage_FOUND)
endif()
2 changes: 2 additions & 0 deletions grid_map_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
<depend>sensor_msgs</depend>
<depend>cv_bridge</depend>
<depend>octomap_msgs</depend>
<!-- <test_depend>cmake_code_coverage</test_depend> -->
<test_depend>gtest</test_depend>
</package>
5 changes: 5 additions & 0 deletions grid_map_demos/test/empty_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <gtest/gtest.h>

TEST(Placeholder, emptyTest) { // NOLINT
ASSERT_TRUE(true);
}

0 comments on commit 6e7fd04

Please sign in to comment.