Macro for Nightly Test

A ROOT macro, which runs simulation, reconstruction or data analysis with R3BRoot, can be configured for automatic nightly/continuous tests with ctest and CDash. More information about the machinery can be found here.

In order to add the macro to the testing system, CMakeLists.txt file in the same directory has to contain following lines (example with r3bsim.C macro):

GENERATE_ROOT_TEST_SCRIPT(${R3BROOT_SOURCE_DIR}/macros/r3b/r3bsim.C)
add_test(r3bsim ${R3BROOT_BINARY_DIR}/macros/r3b/r3bsim.sh)
SET_TESTS_PROPERTIES(r3bsim PROPERTIES TIMEOUT "100")
SET_TESTS_PROPERTIES(r3bsim PROPERTIES PASS_REGULAR_EXPRESSION "TestPassed;All ok")


In this case, r3bsim.C makes cout "TestPassed" and "All ok", which will be treated as successful test.
For more advanced testing of algorithms, a quantitative check of the output results can be performed in the macro, which results in cout of a similar "success status".

For a test to appear on the CDash server, changes have to be committed to the dev or master branch.