From: Anthony Geay Date: Mon, 8 Feb 2021 15:37:19 +0000 (+0100) Subject: Launch same test under salome test mechanism than build ParaMEDMEMTest tests X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=083f40f2d9265f527fb370467df2de2055fa5dda;p=tools%2Fmedcoupling.git Launch same test under salome test mechanism than build ParaMEDMEMTest tests --- diff --git a/src/ParaMEDMEMTest/CMakeLists.txt b/src/ParaMEDMEMTest/CMakeLists.txt index 1708ceeb1..119dce22c 100644 --- a/src/ParaMEDMEMTest/CMakeLists.txt +++ b/src/ParaMEDMEMTest/CMakeLists.txt @@ -156,6 +156,6 @@ INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS}) SET(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/ParaMEDMEMTest) INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${TEST_INSTALL_DIRECTORY}) -INSTALL(FILES CTestTestfileInstall.cmake - DESTINATION ${TEST_INSTALL_DIRECTORY} - RENAME CTestTestfile.cmake) +# 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/ParaMEDMEMTest/CTestTestfileInstall.cmake b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake deleted file mode 100644 index 3d6f5f9df..000000000 --- a/src/ParaMEDMEMTest/CTestTestfileInstall.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2015-2020 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(TEST_NAMES - ParaMEDMEMTest -) - -SET(TEST_FILES - ParaMEDMEMTestMPI2_1 - ParaMEDMEMTestMPI2_2 - TestMPIAccess - TestMPIAccessDEC - TestParaMEDMEM - test_perf -) -FOREACH(tfile ${TEST_FILES}) - SET(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) - ADD_TEST(${TEST_NAME} ${tfile}) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ) -ENDFOREACH() diff --git a/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in new file mode 100644 index 000000000..b860f7590 --- /dev/null +++ b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in @@ -0,0 +1,58 @@ +# Copyright (C) 2015-2020 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) + +# TestParaMEDMEM + +set(tfile TestParaMEDMEM_Proc2) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 2 ${_oversub_opt} TestParaMEDMEM) + +set(tfile TestParaMEDMEM_Proc3) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 3 ${_oversub_opt} TestParaMEDMEM) + +set(tfile TestParaMEDMEM_Proc4) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} TestParaMEDMEM) + +set(tfile TestParaMEDMEM_Proc5) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 5 ${_oversub_opt} TestParaMEDMEM) + +# TestMPIAccess + +set(tfile TestMPIAccess_Proc2) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 2 ${_oversub_opt} TestMPIAccess) + +set(tfile TestMPIAccess_Proc3) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 3 ${_oversub_opt} TestMPIAccess) + +# TestMPIAccessDEC + +set(tfile TestMPIAccessDEC_Proc4) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} TestMPIAccessDEC) +