Skip to content

Commit

Permalink
roslint can be a test-depend (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timple committed Apr 27, 2023
1 parent 16be797 commit 4dc95ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 7 additions & 7 deletions velodyne_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ elseif ("${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}" STREQUAL "98")
set(CMAKE_CXX_STANDARD 11)
endif()

set(${PROJECT_NAME}_CATKIN_DEPS
set(${PROJECT_NAME}_CATKIN_DEPS
diagnostic_updater
dynamic_reconfigure
nodelet
roscpp
tf
velodyne_msgs)

find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_DEPS} roslint)
find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_DEPS})

# This driver uses Boost threads
find_package(Boost REQUIRED COMPONENTS thread)
Expand Down Expand Up @@ -49,14 +49,14 @@ install(DIRECTORY launch/
install(PROGRAMS src/vdump
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

roslint_cpp()

if (CATKIN_ENABLE_TESTING)

# these dependencies are only needed for unit testing
find_package(roslaunch REQUIRED)
find_package(roslint REQUIRED)
find_package(rostest REQUIRED)

roslint_cpp()

# Download packet capture (PCAP) files containing test data.
# Store them in devel-space, so rostest can easily find them.
catkin_download_test_data(
Expand All @@ -74,15 +74,15 @@ if (CATKIN_ENABLE_TESTING)
http://download.ros.org/data/velodyne/vlp16.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 f45c2bb1d7ee358274e423ea3b66fd73)

# unit tests
add_rostest(tests/pcap_node_hertz.test)
add_rostest(tests/pcap_nodelet_hertz.test)
add_rostest(tests/pcap_32e_node_hertz.test)
add_rostest(tests/pcap_32e_nodelet_hertz.test)
add_rostest(tests/pcap_vlp16_node_hertz.test)
add_rostest(tests/pcap_vlp16_nodelet_hertz.test)

# parse check all the launch/*.launch files
roslaunch_add_file_check(launch)

Expand Down
3 changes: 1 addition & 2 deletions velodyne_driver/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>roslint</build_depend>

<depend>diagnostic_updater</depend>
<depend>dynamic_reconfigure</depend>
<depend>libpcap</depend>
Expand All @@ -30,6 +28,7 @@
<depend>velodyne_msgs</depend>

<test_depend>roslaunch</test_depend>
<test_depend>roslint</test_depend>
<test_depend>rostest</test_depend>

<export>
Expand Down

0 comments on commit 4dc95ac

Please sign in to comment.