We run the ROOT tests using ctest driver. All tests are defined within the CTest framework. The following tests categories exists:
- ROOT basic tests delivered in:
$ROOTSYS/test
- ROOT tutorials delivered in:
$ROOTSYS/tutorials
- ROOTTEST tests that can be, until ROOT version 6.36, downloaded from ; roottest repository).
git clone http://root.cern.ch/git/roottest.git
and for more recent versions, delivered in:$ROOTSYS/roottest
Running tests from the build directory (CMake)
Testing is not enabled by default when configuring the ROOT build. Enabling is done by the option testing
and the option roottest
to add the ROOTTEST tests to the test suit. The basic instructions are:
$ mkdir <builddir>
$ cd <builddir>
$ cmake -Dtesting=ON -Droottest=ON <root-sources-dir>
$ cmake --build
$ ctest -j8
You can select a subset of tests by using the -R <regexpr>
and see the test output by adding -V
to the ctest command. See the complete set of options of ctest
Running tests using an existing installation produced by CMake
It is assumed that you have the proper ROOT environment setup ( with source <installdir>/bin/thisroot.sh
)
Running the basic ROOT tests
$ mkdir runtests
$ cd runtests
$ cmake $ROOTSYS/test
$ make # to build the test libraries and executables
$ ctest -j8
Running the ROOTTEST tests
Until ROOT 6.36, we need to checkout the ROOTTEST repository, create a build area and configure with cmake.
$ git clone http://root.cern.ch/git/roottest.git
$ mkdir runtests
$ cd runtests
$ cmake ../roottest
$ ctest -j8