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

Add tests in cmake #102

Merged
merged 1 commit into from
Jun 6, 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
5 changes: 3 additions & 2 deletions .github/workflows/build_and_test_ubuntu20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ jobs:
run: |
export LD_LIBRARY_PATH=/usr/local/lib
export PYTHONPATH=/usr/local/lib/python3.8/site-packages
cd wbc
sh scripts/run_tests.sh
cd wbc/build
make test

4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_ubuntu22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
run: |
export LD_LIBRARY_PATH=/usr/local/lib
export PYTHONPATH=/usr/local/lib/python3.10/site-packages
cd wbc
sh scripts/run_tests.sh
cd wbc/build
make test
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 3.16.3)
project(wbc)
include(CTest)

find_package(PkgConfig REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework serialization)
Expand Down
105 changes: 0 additions & 105 deletions scripts/run_tests.sh

This file was deleted.

4 changes: 4 additions & 0 deletions src/controllers/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ add_executable(test_pid_controllers test_pid_controllers.cpp)
target_link_libraries(test_pid_controllers
wbc-controllers
Boost::unit_test_framework)

add_test(NAME test_pot_field_controllers COMMAND test_pot_field_controllers)
add_test(NAME test_pos_pd_controllers COMMAND test_pos_pd_controllers)
add_test(NAME test_pid_controllers COMMAND test_pid_controllers)
2 changes: 2 additions & 0 deletions src/core/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_core test_core.cpp)
target_link_libraries(test_core
wbc-core
Boost::unit_test_framework)

add_test(NAME test_core COMMAND test_core)
2 changes: 2 additions & 0 deletions src/robot_models/hyrodyn/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_robot_model_hyrodyn test_robot_model_hyrodyn.cpp ../../test/
target_link_libraries(test_robot_model_hyrodyn
wbc-robot_models-hyrodyn
Boost::unit_test_framework)

add_test(NAME test_robot_model_hyrodyn COMMAND test_robot_model_hyrodyn)
2 changes: 2 additions & 0 deletions src/robot_models/kdl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_robot_model_kdl test_robot_model_kdl.cpp ../../test/test_rob
target_link_libraries(test_robot_model_kdl
wbc-robot_models-kdl
Boost::unit_test_framework)

add_test(NAME test_robot_model_kdl COMMAND test_robot_model_kdl)
2 changes: 2 additions & 0 deletions src/robot_models/pinocchio/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ target_link_libraries(test_robot_model_pinocchio
Boost::system
Boost::filesystem
Boost::serialization)

add_test(NAME test_robot_model_pinocchio COMMAND test_robot_model_pinocchio)
2 changes: 2 additions & 0 deletions src/robot_models/rbdl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_robot_model_rbdl test_robot_model_rbdl.cpp ../../test/test_r
target_link_libraries(test_robot_model_rbdl
wbc-robot_models-rbdl
Boost::unit_test_framework)

add_test(NAME test_robot_model_rbdl COMMAND test_robot_model_rbdl)
2 changes: 2 additions & 0 deletions src/scenes/acceleration/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target_link_libraries(test_acceleration_scene
wbc-robot_models-pinocchio
wbc-solvers-qpoases
Boost::unit_test_framework)

add_test(NAME test_acceleration_scene COMMAND test_acceleration_scene)
2 changes: 2 additions & 0 deletions src/scenes/acceleration_reduced_tsid/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target_link_libraries(test_acceleration_scene_reduced_tsid
wbc-robot_models-pinocchio
wbc-solvers-qpoases
Boost::unit_test_framework)

add_test(NAME test_acceleration_scene_reduced_tsid COMMAND test_acceleration_scene_reduced_tsid)
2 changes: 2 additions & 0 deletions src/scenes/acceleration_tsid/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target_link_libraries(test_acceleration_scene_tsid
wbc-robot_models-pinocchio
wbc-solvers-qpoases
Boost::unit_test_framework)

add_test(NAME test_acceleration_scene_tsid COMMAND test_acceleration_scene_tsid)
2 changes: 2 additions & 0 deletions src/scenes/velocity/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ target_link_libraries(test_velocity_scene
wbc-solvers-hls
Boost::unit_test_framework)

add_test(NAME test_velocity_scene COMMAND test_velocity_scene)

2 changes: 2 additions & 0 deletions src/scenes/velocity_qp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ target_link_libraries(test_velocity_scene_quadratic_cost
wbc-solvers-qpoases
Boost::unit_test_framework)

add_test(NAME test_velocity_scene_quadratic_cost COMMAND test_velocity_scene_quadratic_cost)

2 changes: 2 additions & 0 deletions src/solvers/eiquadprog/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_eiquadprog_solver test_eiquadprog_solver.cpp)
target_link_libraries(test_eiquadprog_solver
wbc-solvers-eiquadprog
Boost::unit_test_framework)

add_test(NAME test_eiquadprog_solver COMMAND test_eiquadprog_solver)
2 changes: 2 additions & 0 deletions src/solvers/hls/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_hls_solver test_hls_solver.cpp)
target_link_libraries(test_hls_solver
wbc-solvers-hls
Boost::unit_test_framework)

add_test(NAME test_hls_solver COMMAND test_hls_solver)
2 changes: 2 additions & 0 deletions src/solvers/osqp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_osqp_solver test_osqp_solver.cpp)
target_link_libraries(test_osqp_solver
wbc-solvers-osqp
Boost::unit_test_framework)

add_test(NAME test_osqp_solver COMMAND test_osqp_solver)
2 changes: 2 additions & 0 deletions src/solvers/proxqp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_proxqp_solver test_proxqp_solver.cpp)
target_link_libraries(test_proxqp_solver
wbc-solvers-proxqp
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})

add_test(NAME test_proxqp_solver COMMAND test_proxqp_solver)
2 changes: 2 additions & 0 deletions src/solvers/qpoases/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_qpoases_solver test_qpoases_solver.cpp)
target_link_libraries(test_qpoases_solver
wbc-solvers-qpoases
Boost::unit_test_framework)

add_test(NAME test_qpoases_solver COMMAND test_qpoases_solver)
2 changes: 2 additions & 0 deletions src/solvers/qpswift/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ add_executable(test_qpswift_solver test_qpswift_solver.cpp)
target_link_libraries(test_qpswift_solver
wbc-solvers-qpswift
Boost::unit_test_framework)

add_test(NAME test_qpswift_solver COMMAND test_qpswift_solver)
Loading