Skip to content

Streamline configuration and use of Test

Benjamin Morgan requested to merge bmorgan/ctest-upgrade into master

To assist in upcoming MRs that will address more complicated topics, this streamlines the use of CTest in VecGeom and additional test configuration.

  • All (known) testing related options are grouped in the top level script for clarity
  • The CTEST option is removed in favour of direct inclusion of the CTest module and the associated BUILD_TESTING option.
    • BUILD_TESTING is ON by default, leading to no change in expected behaviour (tests are enabled by default).
    • CI/Scripts using CTEST are updated to use BUILD_TESTING in its place
  • The DATA_DOWNLOAD option is removed as obsolete
    • Testing almost always requires the data, whether it is already present locally (checked via path+hash) or downloaded
    • Data won't be downloaded if already present at the expected path+hash
    • Behaviour is:
      • Data checked and downloaded if BUILD_TESTING is true
      • If data is present with correct path+hash, no action is taken
      • If data is present with correct path, incorrect has, it is re-downloaded
      • If data is not present, it is downloaded

I've marked as draft to check things through the basic CI cycle. There are some remaining issues to deal with in relation with the above and VECGEOM-549 on the ROOT/Geant4 dependencies:

  • The test data should go in one single directory in the build area, for clarity, and so that it can be updated/checked easily by the developer
    • This also helps packaging systems that cannot download files/etc at CMake/Compile time. They can "vendor/resource" the files with the package in this location if they enable testing.
  • The tests needing these data need to be identified so that activation of the check/download can be more tightly scoped
  • The ROOT/GEANT4 options are only valid for testing VecGeom and should not be used for an install
    • Only way I can see to tackle this is to disable install of VecGeom if either of these options is set?
  • The VTUNE/COVERAGE/VALIDATION/BENCHMARKING options are probably similar, but needs clarifying
Edited by Benjamin Morgan

Merge request reports