Salome HOME
Into MEDReader plugin NewGroupsNames filter linked with GroupAsMultiBlock filter
[modules/paravis.git] / src / Plugins / MEDReader / plugin / Test / CMakeLists.txt
1 # Copyright (C) 2010-2020  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 if (PARAVIEW_ENABLE_PYTHON)
21   file(GLOB pythonTests *.py)
22   list(FILTER pythonTests EXCLUDE REGEX ".*MEDReaderHelper.py$")
23   foreach(testFullPath ${pythonTests})
24     get_filename_component(testFile ${testFullPath} NAME)
25     paraview_add_test_python(NO_RT DIRECT_DATA ${testFile})
26     get_filename_component(testName ${testFile} NAME_WE)
27     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/")
28   endforeach()
29 endif()
30
31 if (PARAVIEW_USE_QT)
32   file(GLOB xmlTests *.xml)
33   foreach(testFullPath ${xmlTests})
34     get_filename_component(testFile ${testFullPath} NAME)
35     get_filename_component(testName ${testFile} NAME_WE)
36     set (${testName}_USES_DIRECT_DATA ON)
37     paraview_add_client_tests(
38       LOAD_PLUGIN MEDReader
39       PLUGIN_PATH $<TARGET_FILE_DIR:MEDReader>
40       BASELINE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Data/Baseline
41       TEST_SCRIPTS ${testFile})
42     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")
43   endforeach()
44 endif()