Skip to content

Commit

Permalink
Merge pull request #161 from KumarRobotics/noetic
Browse files Browse the repository at this point in the history
Added rostest for SO3ControlNodelet
  • Loading branch information
fcladera authored Mar 12, 2024
2 parents fd1d83c + e7ce750 commit 770d2d6
Show file tree
Hide file tree
Showing 7 changed files with 730 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: build-and-test

on:
push:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
apt-get update
apt-get install -qy g++ libeigen3-dev
apt-get install -qy g++ libeigen3-dev python3-catkin-tools
rosdep update
rosdep install --from-paths . --ignore-src -y -r --as-root apt:false
Expand All @@ -32,9 +32,11 @@ jobs:
ln -s ${GITHUB_WORKSPACE}
catkin_init_workspace .
- name: Build workspace
- name: Build workspace and run tests
run: |
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
cd ${RUNNER_WORKSPACE}/catkin_ws
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,--no-undefined,-z,relro,-z,now -pthread"
catkin_make -DCMAKE_BUILD_TYPE=NONE
catkin build -j4 --no-status -DCMAKE_BUILD_TYPE=Release
. ${RUNNER_WORKSPACE}/catkin_ws/devel/setup.sh
catkin test
14 changes: 7 additions & 7 deletions .github/workflows/cpplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
flags: --linelength=120 # Optional
filter: "-whitespace/braces \"
,-whitespace/parens"
#"-readability/braces\
# ,-whitespace/braces\
flags: --linelength=120
filter: "-readability/braces\
,-whitespace/braces\
,-whitespace/parens\
,-whitespace/newline\
,-build/c++11"
# -readability/braces\
# ,-whitespace/comments\
# ,-whitespace/indent\
# ,-whitespace/newline\
# ,-whitespace/operators\
# ,-whitespace/parens\
# " # Optional
20 changes: 20 additions & 0 deletions kr_mav_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,23 @@ install(
install(FILES nodelet_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

if(CATKIN_ENABLE_TESTING)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
nav_msgs
kr_mav_msgs
rostest
)

include_directories(include ${catkin_INCLUDE_DIRS})
include_directories(${GTEST_INCLUDE_DIRS})

add_executable(so3_control_nodelet_test test/so3_control_nodelet_test.cpp)
# add_rostest_gtest(so3_control_nodelet_test test/so3_control_nodelet.test test/so3_control_nodelet_test.cpp)
target_link_libraries(so3_control_nodelet_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES})

add_rostest(test/so3_control_nodelet.test)

endif()
Loading

0 comments on commit 770d2d6

Please sign in to comment.