Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added rostest for SO3ControlNodelet #161

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading