VTK testing macros are not external module friendly
Adding tests to VTK modules outside of VTK is not friendly at all.
Here is how it currently works in VTK.
- VTK rely on ExternalData to recover data. This is fine and generally not used outside of VTK and optional generally, nothing to fix here
- vtkTesting.cxx rely on the -V/-B/-D/-T to find out where is located the baselines, data and such, this is fine and could be used outside of VTK
- vtkModuleTesting.cmake is where the fix should happens
in vtk_add_test_cxx macro we should be able to:
- set if external data should be used or not
- set if only baseline dir should be used or full baseline name
- set the baseline dir
- set the data dir
- set the temporary dir
in vtk_add_test_python we should be able to:
- set the baseline dir
- set the data dir
- set the temporary dir
Currently, these dirs are hardcoded which is not practical at all. They can be specified with env vars but this is not the right way to go.
FYI @ben.boeckel
Edited by Mathieu Westphal (Kitware)