From: abn Date: Thu, 2 Jun 2022 14:42:29 +0000 (+0200) Subject: Disabling usage of MEDCOUPLING_BUILD_PY_TESTS at application level. X-Git-Tag: V9_9_1b1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39a037f623671756d29141b660d85c0fa977e5b6;p=tools%2Fmedcoupling.git Disabling usage of MEDCOUPLING_BUILD_PY_TESTS at application level. + updating CTestTestfileInstall.cmake files --- diff --git a/src/ICoCo/Swig/CTestTestfileInstall.cmake b/src/ICoCo/Swig/CTestTestfileInstall.cmake index 61d1552e1..f43a931d4 100644 --- a/src/ICoCo/Swig/CTestTestfileInstall.cmake +++ b/src/ICoCo/Swig/CTestTestfileInstall.cmake @@ -17,15 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(MEDCOUPLING_BUILD_PY_TESTS) - INCLUDE(tests.set) - FOREACH(tfile ${ALL_TESTS}) - GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) - SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) - ADD_TEST(${TEST_NAME} python ${tfile}) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ) - ENDFOREACH() -ENDIF() +INCLUDE(tests.set) + +FOREACH(tfile ${ALL_TESTS}) + GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) + SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) + ADD_TEST(${TEST_NAME} python ${tfile}) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ) +ENDFOREACH() diff --git a/src/MEDCoupling_Swig/CTestTestfileInstall.cmake b/src/MEDCoupling_Swig/CTestTestfileInstall.cmake index 61d1552e1..f43a931d4 100644 --- a/src/MEDCoupling_Swig/CTestTestfileInstall.cmake +++ b/src/MEDCoupling_Swig/CTestTestfileInstall.cmake @@ -17,15 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(MEDCOUPLING_BUILD_PY_TESTS) - INCLUDE(tests.set) - FOREACH(tfile ${ALL_TESTS}) - GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) - SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) - ADD_TEST(${TEST_NAME} python ${tfile}) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ) - ENDFOREACH() -ENDIF() +INCLUDE(tests.set) + +FOREACH(tfile ${ALL_TESTS}) + GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) + SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) + ADD_TEST(${TEST_NAME} python ${tfile}) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ) +ENDFOREACH() diff --git a/src/MEDLoader/Swig/CTestTestfileInstall.cmake b/src/MEDLoader/Swig/CTestTestfileInstall.cmake index 61d1552e1..f43a931d4 100644 --- a/src/MEDLoader/Swig/CTestTestfileInstall.cmake +++ b/src/MEDLoader/Swig/CTestTestfileInstall.cmake @@ -17,15 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(MEDCOUPLING_BUILD_PY_TESTS) - INCLUDE(tests.set) - FOREACH(tfile ${ALL_TESTS}) - GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) - SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) - ADD_TEST(${TEST_NAME} python ${tfile}) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ) - ENDFOREACH() -ENDIF() +INCLUDE(tests.set) + +FOREACH(tfile ${ALL_TESTS}) + GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) + SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) + ADD_TEST(${TEST_NAME} python ${tfile}) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ) +ENDFOREACH() diff --git a/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in index 339ae323d..b9b44fa82 100644 --- a/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in +++ b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in @@ -20,34 +20,32 @@ set(MPIEXEC @MPIEXEC@) set(_oversub_opt @_oversub_opt@) -SET(TEST_PREFIX ParaMEDMEMTest) +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}) -IF(MEDCOUPLING_BUILD_PY_TESTS) - set(tfile PyPara_Basics_Proc2) - set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${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_PREFIX}_${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_PREFIX}_${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_PREFIX}_${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_PREFIX}_${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}) -ENDIF() +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}) diff --git a/src/PyWrapping/CTestTestfileInstall.cmake b/src/PyWrapping/CTestTestfileInstall.cmake index 3a61734b1..66d982bf3 100644 --- a/src/PyWrapping/CTestTestfileInstall.cmake +++ b/src/PyWrapping/CTestTestfileInstall.cmake @@ -17,16 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(MEDCOUPLING_BUILD_PY_TESTS) - INCLUDE(tests.set) - FOREACH(tfile ${BASE_TESTS}) - GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) - SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) - ADD_TEST(${TEST_NAME} python ${tfile}) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ) - ENDFOREACH() -ENDIF() +INCLUDE(tests.set) +FOREACH(tfile ${BASE_TESTS}) + GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) + SET(TEST_NAME ${COMPONENT_NAME}_${BASE_NAME}) + ADD_TEST(${TEST_NAME} python ${tfile}) + SET_TESTS_PROPERTIES( ${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT} ) +ENDFOREACH() diff --git a/src/RENUMBER_Swig/CTestTestfileInstall.cmake b/src/RENUMBER_Swig/CTestTestfileInstall.cmake index 73ba1f5bb..09e57cacf 100644 --- a/src/RENUMBER_Swig/CTestTestfileInstall.cmake +++ b/src/RENUMBER_Swig/CTestTestfileInstall.cmake @@ -17,25 +17,24 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(MEDCOUPLING_BUILD_PY_TESTS) - SET(TEST_NAMES - MEDRenumberTest - ) - FOREACH(tfile ${TEST_NAMES}) - SET(TEST_NAME ${COMPONENT_NAME}_${tfile}) - ADD_TEST(${TEST_NAME} python ${tfile}.py) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ENVIRONMENT "PYTHONPATH=../../bin:$ENV{PYTHONPATH}" - ) - ENDFOREACH() - - SET(TEST_NAME ${COMPONENT_NAME}_RENUMBER_Swig_MEDRenumberUserGuide) - ADD_TEST(${TEST_NAME} python UsersGuideExamplesTest.py) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES - LABELS "${COMPONENT_NAME}" - TIMEOUT ${TIMEOUT} - ENVIRONMENT "PYTHONPATH=../../bin:$ENV{PYTHONPATH}" - ) -ENDIF() +SET(TEST_NAMES + MEDRenumberTest +) + +FOREACH(tfile ${TEST_NAMES}) + SET(TEST_NAME ${COMPONENT_NAME}_${tfile}) + ADD_TEST(${TEST_NAME} python ${tfile}.py) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ENVIRONMENT "PYTHONPATH=../../bin:$ENV{PYTHONPATH}" + ) +ENDFOREACH() + +SET(TEST_NAME ${COMPONENT_NAME}_RENUMBER_Swig_MEDRenumberUserGuide) +ADD_TEST(${TEST_NAME} python UsersGuideExamplesTest.py) +SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ENVIRONMENT "PYTHONPATH=../../bin:$ENV{PYTHONPATH}" + )