1 # Copyright (C) 2010-2022 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
22 ###########################
23 # Tests for standalone mode
24 ###########################
26 if (PARAVIEW_ENABLE_PYTHON)
27 file(GLOB pythonTests *.py)
28 foreach(testFullPath ${pythonTests})
29 get_filename_component(testFile ${testFullPath} NAME)
30 paraview_add_test_python(NO_RT DIRECT_DATA ${testFile})
31 get_filename_component(testName ${testFile} NAME_WE)
32 set_tests_properties(Python-${testName} PROPERTIES ENVIRONMENT "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.8/plugins/MEDWriter;PARAVIEW_BIN_DIR=${ParaView_DIR}/bin/")
37 file(GLOB xmlTests *.xml)
38 foreach(testFullPath ${xmlTests})
39 get_filename_component(testFile ${testFullPath} NAME)
40 get_filename_component(testName ${testFile} NAME_WE)
41 set (${testName}_USES_DIRECT_DATA ON)
42 paraview_add_client_tests(
44 PLUGIN_PATH $<TARGET_FILE_DIR:MEDWriter>
45 TEST_SCRIPTS ${testFile})
46 set_tests_properties(pv.${testName} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${QT5_ROOT_DIR}/lib/:${MEDCOUPLING_ROOT_DIR}/lib/:${MEDFILE_ROOT_DIR}/lib/:${HDF5_ROOT_DIR}/lib:${PYTHON_ROOT_DIR}/lib")
52 ########################
53 # Tests for PARAVIS mode
54 ########################
58 salome_generate_tests_environment(tests_env)
60 IF(SALOME_PARAVIS_NO_VISU_TESTS)
61 SET(_other_options "-D")
64 foreach(tfile ${TEST_NUMBERS})
65 add_test(Python-TestMEDWriter${tfile}
67 ${CMAKE_CURRENT_SOURCE_DIR}/TestMEDWriter${tfile}.py
69 set_tests_properties(Python-TestMEDWriter${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
73 set(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDWriter)
74 foreach(tfile ${TEST_NUMBERS})
75 install(FILES TestMEDWriter${tfile}.py
76 DESTINATION ${TEST_INSTALL_DIRECTORY})
79 install(FILES tests.set
80 DESTINATION ${TEST_INSTALL_DIRECTORY})
81 install(FILES CTestTestfileInstall.cmake
82 DESTINATION ${TEST_INSTALL_DIRECTORY}
83 RENAME CTestTestfile.cmake)