Missing dlls for cxx tests inside ParaView plugins on Windows
Currently, the VTK testing framework do not allow to run cxx
tests written inside ParaView plugins without doing some "hacks".
By default test executables are put in paraview_build_dir\bin\paraview-X.XX\plugins\MyPlugin
while VTK module libraries are in paraview_build_dir\bin
, so they are not able to find the dlls at runtime.
A workaround is to edit the PATH
environment variable for these tests specifically, for example:
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" paraview_libraries_path)
set(test_path "$ENV{PATH};${paraview_libraries_path}")
string(REPLACE ";" "\;" test_path "${test_path}")
foreach(test IN LISTS tests)
string(REPLACE ".cxx" "" test "${test}")
set_tests_properties(MyPlugin::MyModuleCxx-${test} PROPERTIES
ENVIRONMENT "PATH=${test_path}"
)
endforeach()
Is there a good way to add cxx
tests from plugins, that we can add to the testing framework ?