osqp-eigen icon indicating copy to clipboard operation
osqp-eigen copied to clipboard

Simple question on building and running tests

Open Neotriple opened this issue 2 years ago • 1 comments

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.

Neotriple avatar Jun 12 '22 19:06 Neotriple

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 avatar Jun 13 '22 08:06 traversaro

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

traversaro avatar Nov 09 '22 10:11 traversaro