Salome HOME
activate paramedmem test with "salome test" mechanism
authorDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Fri, 15 Jan 2021 17:11:02 +0000 (18:11 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 8 Feb 2021 16:03:38 +0000 (17:03 +0100)
src/CMakeLists.txt
src/CTestTestfileInstall.cmake [deleted file]
src/CTestTestfileInstall.cmake.in [new file with mode: 0644]
src/ParaMEDMEMTest/CMakeLists.txt
src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in [new file with mode: 0644]

index ebae2bd8ef15c9e9931eda5a11ab8f7bbbe97313..768a16751f4811f92bb270b7edaed2989902075f 100644 (file)
@@ -70,6 +70,6 @@ IF(MEDCOUPLING_USE_MPI)
 ENDIF(MEDCOUPLING_USE_MPI)
 
 # Application tests
-INSTALL(FILES CTestTestfileInstall.cmake
-  DESTINATION ${MEDCOUPLING_INSTALL_TESTS}
-  RENAME CTestTestfile.cmake)
+configure_file(CTestTestfileInstall.cmake.in "CTestTestfileST.cmake" @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileST.cmake DESTINATION ${MEDCOUPLING_INSTALL_TESTS} RENAME CTestTestfile.cmake)
+
diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake
deleted file mode 100644 (file)
index c50893a..0000000
+++ /dev/null
@@ -1,34 +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(COMPONENT_NAME MEDCOUPLING)
-SET(TIMEOUT        120)
-
-SUBDIRS(INTERP_KERNELTest)
-SUBDIRS(MEDCoupling)
-SUBDIRS(MEDCoupling_Swig)
-SUBDIRS(MEDLoader)
-SUBDIRS(MEDLoader_Swig)
-SUBDIRS(MEDPartitioner)
-#SUBDIRS(ParaMEDMEM_Swig)
-#SUBDIRS(ParaMEDMEMTest)
-SUBDIRS(MEDPartitioner_Swig)
-SUBDIRS(RENUMBER_Swig)
-SUBDIRS(PyWrapping)
-
diff --git a/src/CTestTestfileInstall.cmake.in b/src/CTestTestfileInstall.cmake.in
new file mode 100644 (file)
index 0000000..76061c7
--- /dev/null
@@ -0,0 +1,37 @@
+# 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(COMPONENT_NAME MEDCOUPLING)
+SET(TIMEOUT        120)
+
+SUBDIRS(INTERP_KERNELTest)
+SUBDIRS(MEDCoupling)
+SUBDIRS(MEDCoupling_Swig)
+SUBDIRS(MEDLoader)
+SUBDIRS(MEDLoader_Swig)
+SUBDIRS(MEDPartitioner)
+
+set(MEDCOUPLING_USE_MPI_BOOL $<BOOL:@MEDCOUPLING_USE_MPI@>)
+if(MEDCOUPLING_USE_MPI_BOOL)
+    SUBDIRS(ParaMEDMEMTest)
+endif()
+
+SUBDIRS(MEDPartitioner_Swig)
+SUBDIRS(RENUMBER_Swig)
+SUBDIRS(PyWrapping)
index 7e65d5cbef94e9263040bb0e72df25c4c6a3484a..119dce22c04f55600a4b8e93b3b29567f5746b65 100644 (file)
@@ -150,3 +150,12 @@ SET(COMMON_HEADERS_HXX
   MPI2Connector.hxx
 )
 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
+
+# Application tests
+
+SET(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/ParaMEDMEMTest)
+INSTALL(TARGETS ${TESTSParaMEDMEM} 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/ParaMEDMEMTest/CTestTestfileInstall.cmake.in b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in
new file mode 100644 (file)
index 0000000..b860f75
--- /dev/null
@@ -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)
+