From 6eaf33a3852907941962773985a64359b0fe2f41 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 31 Mar 2021 15:19:05 +0200 Subject: [PATCH] synchronize make test and salome test --- src/CTestTestfileInstall.cmake.in | 1 + src/ParaMEDMEM_Swig/CMakeLists.txt | 6 +++ .../CTestTestfileInstall.cmake.in | 51 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in diff --git a/src/CTestTestfileInstall.cmake.in b/src/CTestTestfileInstall.cmake.in index b889475d5..a736b5e0e 100644 --- a/src/CTestTestfileInstall.cmake.in +++ b/src/CTestTestfileInstall.cmake.in @@ -30,6 +30,7 @@ SUBDIRS(MEDPartitioner) set(MEDCOUPLING_USE_MPI_BOOL $) if(MEDCOUPLING_USE_MPI_BOOL) SUBDIRS(ParaMEDMEMTest) + SUBDIRS(ParaMEDMEM_Swig) endif() SUBDIRS(MEDPartitioner_Swig) diff --git a/src/ParaMEDMEM_Swig/CMakeLists.txt b/src/ParaMEDMEM_Swig/CMakeLists.txt index 7a55bc574..861688a58 100644 --- a/src/ParaMEDMEM_Swig/CMakeLists.txt +++ b/src/ParaMEDMEM_Swig/CMakeLists.txt @@ -116,3 +116,9 @@ INSTALL(FILES ${_tst_scripts} DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON}) SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MEDCOUPLING_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_ParaMEDMEM_REAL_NAME}") INSTALL(FILES test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON}) + +set(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/ParaMEDMEM_Swig) +install(FILES test_InterpKernelDEC.py test_NonCoincidentDEC.py test_OverlapDEC.py test_StructuredCoincidentDEC.py ParaMEDMEMTestTools.py DESTINATION ${TEST_INSTALL_DIRECTORY}) +# export MPIEXEC and _oversub_opt to CTestTestfile.cmake of salome test mechanism +configure_file(CTestTestfileInstall.cmake.in "CTestTestfileST.cmake" @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileST.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} RENAME CTestTestfile.cmake) diff --git a/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in new file mode 100644 index 000000000..3a6453750 --- /dev/null +++ b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in @@ -0,0 +1,51 @@ +# Copyright (C) 2015-2021 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +set(MPIEXEC @MPIEXEC@) +set(_oversub_opt @_oversub_opt@) + +SET(TEST_NAMES ParaMEDMEMTest) + +# force mpiexec to use PATH env var to detect right python into mpiexec command line +set(PATH_FOR_PYTHON $ENV{PATH}) + +set(tfile PyPara_Basics_Proc2) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 2 ${_oversub_opt} -path "${PATH_FOR_PYTHON}" python3 test_BasicOperation.py) +set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) + +set(tfile PyPara_InterpKernelDEC_Proc4) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} -path "${PATH_FOR_PYTHON}" python3 test_InterpKernelDEC.py) +set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) + +set(tfile PyPara_InterpKernelDEC_Proc5) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 5 ${_oversub_opt} -path "${PATH_FOR_PYTHON}" python3 test_InterpKernelDEC.py) +set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) + +set(tfile PyPara_StructuredCoincidentDEC_Proc4) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} -path "${PATH_FOR_PYTHON}" python3 test_StructuredCoincidentDEC.py) +set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) + +set(tfile PyPara_OverlapDEC_Proc4) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} -path "${PATH_FOR_PYTHON}" python3 test_OverlapDEC.py) +set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) -- 2.39.2