From: vsr Date: Tue, 7 Apr 2020 12:32:26 +0000 (+0300) Subject: bos #18951 [CEA 18933] MEDReader tests X-Git-Tag: V9_6_0a2~1^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db93ca2e5e76624d07dda44ca95cdaeb1f9bdc00;p=modules%2Fparavis.git bos #18951 [CEA 18933] MEDReader tests --- diff --git a/src/Plugins/MEDReader/plugin/CMakeLists.txt b/src/Plugins/MEDReader/plugin/CMakeLists.txt index a3d7a779..ae8b9b2d 100644 --- a/src/Plugins/MEDReader/plugin/CMakeLists.txt +++ b/src/Plugins/MEDReader/plugin/CMakeLists.txt @@ -57,7 +57,7 @@ SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib add_subdirectory(MEDLoaderForPV) add_subdirectory(ParaViewPlugin) -option(BUILD_TESTING "Build Plugin Testing" OFF) -if (BUILD_TESTING) +SET(SALOME_BUILD_TESTS ON CACHE BOOL "Enable testing") +if (SALOME_BUILD_TESTS) add_subdirectory(Test) endif() diff --git a/src/Plugins/MEDReader/plugin/Test/CMakeLists.txt b/src/Plugins/MEDReader/plugin/Test/CMakeLists.txt index 87f3f112..ce32876d 100644 --- a/src/Plugins/MEDReader/plugin/Test/CMakeLists.txt +++ b/src/Plugins/MEDReader/plugin/Test/CMakeLists.txt @@ -17,6 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +#salome_accumulate_environment(PARAVIEW_DATA_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Data) +salome_generate_tests_environment(tests_env) +list(APPEND tests_env "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data") + if (PARAVIEW_ENABLE_PYTHON) file(GLOB pythonTests *.py) list(FILTER pythonTests EXCLUDE REGEX ".*MEDReaderHelper.py$") @@ -24,7 +28,8 @@ if (PARAVIEW_ENABLE_PYTHON) get_filename_component(testFile ${testFullPath} NAME) paraview_add_test_python(NO_RT DIRECT_DATA ${testFile}) get_filename_component(testName ${testFile} NAME_WE) - set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib;PYTHONPATH=${MEDCOUPLING_ROOT_DIR}/lib/python3.6/site-packages/;PV_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/paraview-5.7/plugins/MEDReader;PARAVIEW_BIN_DIR=${ParaView_DIR}/bin/") +# set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib;PYTHONPATH=${MEDCOUPLING_ROOT_DIR}/lib/python3.6/site-packages/;PV_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/paraview-5.7/plugins/MEDReader;PARAVIEW_BIN_DIR=${ParaView_DIR}/bin/") + set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "${tests_env}") endforeach() endif() @@ -39,6 +44,7 @@ if (PARAVIEW_USE_QT) PLUGIN_PATH $ BASELINE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Data/Baseline TEST_SCRIPTS ${testFile}) - set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib") +# set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "PARAVIEW_DATA_ROOT=${CMAKE_CURRENT_SOURCE_DIR}/Data;LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib") + set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "${tests_env}") endforeach() endif()