How to run my tests?

Very stupid question : how do I run my tests ?

In a standard CMake project I would do make test. How do I do it with alibuild ?


Hi Barth,

I do this by going to ~/alice/sw/BUILD/O2-latest/O2 and running make test. To run particular test I just do (from the same directory) e.g.

~/alice/sw/BUILD/O2-latest/O2$ bin/test_ITSMFTSimulation_testAlpideSimResponse
Running 1 test case...

Probably better to use ctest directly (for when we’ll switch to ninja :wink: ) which in addition can filter by name (-R), exclude by name (-E) or to re-run only the failed ones (and more, see ctest --help) :

 ~/alice/sw/BUILD/O2-latest/O2 >  ctest -R sim  // run all test which name contains *sim*
 ~/alice/sw/BUILD/O2-latest/O2 >  ctest --rerun-failed

Thank you both, I had tried to run make test in the build dir but it did not work for some reasons. Now that I have forced a rebuild, it is fine.