robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
395 stars 118 forks source link

Simple question on building and running tests #121

Closed Neotriple closed 2 years ago

Neotriple commented 2 years ago

Hi there,

Just wanted to know how to run the tests in the tests folder when building. I tried running

make test however, received an error stating:

Running tests...
Test project /home/blah/Applications/osqp-eigen/build~
No tests were found!!

Sorry for such a simple question.

traversaro commented 2 years ago

Hi @Neotriple, osqp-eigen follows the typical practice of CMake project w.r.t. to testing, so to enable and run tests you need to configure the CMake project with -DBUILD_TESTING:BOOL=ON, and then run the tests (assuming you are using make) with make test or ctest .. You can check an example of how this is done in GitHub Actions: https://github.com/robotology/osqp-eigen/blob/a5ba242ee8263dc2c101af4a6c8c6fb5795ba4dc/.github/workflows/ci.yml#L130

traversaro commented 2 years ago

Hello @Neotriple, feel free to comment further if you need more info, in the meanwhile I will close the issue.