From 4a2e54e1b7a8af14eed4b0a7a41c126fe1129fbb Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 3 Jun 2022 12:52:08 +0300 Subject: [PATCH] Fix problems with `salome test` --- src/CTestTestfileInstall.cmake.in | 3 ++- src/ICoCo/Swig/CTestTestfileInstall.cmake | 19 +++++++++---------- .../CTestTestfileInstall.cmake | 19 +++++++++---------- src/MEDLoader/Swig/CTestTestfileInstall.cmake | 19 +++++++++---------- .../CTestTestfileInstall.cmake.in | 16 ++++++++-------- .../CTestTestfileInstall.cmake.in | 17 +++++++---------- src/PyWrapping/CTestTestfileInstall.cmake | 15 +++++++++------ src/RENUMBER_Swig/CTestTestfileInstall.cmake | 9 ++++----- 8 files changed, 57 insertions(+), 60 deletions(-) diff --git a/src/CTestTestfileInstall.cmake.in b/src/CTestTestfileInstall.cmake.in index 0de68c67d..0004ac594 100644 --- a/src/CTestTestfileInstall.cmake.in +++ b/src/CTestTestfileInstall.cmake.in @@ -19,6 +19,8 @@ SET(COMPONENT_NAME MEDCOUPLING) SET(TIMEOUT 120) +SET(MEDCOUPLING_BUILD_PY_TESTS $) +SET(MEDCOUPLING_USE_MPI_BOOL $) SUBDIRS(INTERP_KERNELTest) SUBDIRS(MEDCoupling) @@ -28,7 +30,6 @@ SUBDIRS(MEDLoader) SUBDIRS(MEDLoader_Swig) SUBDIRS(MEDPartitioner) -set(MEDCOUPLING_USE_MPI_BOOL $) if(MEDCOUPLING_USE_MPI_BOOL) SUBDIRS(ParaMEDMEMTest) SUBDIRS(ParaMEDMEM_Swig) diff --git a/src/ICoCo/Swig/CTestTestfileInstall.cmake b/src/ICoCo/Swig/CTestTestfileInstall.cmake index fe222f611..61d1552e1 100644 --- a/src/ICoCo/Swig/CTestTestfileInstall.cmake +++ b/src/ICoCo/Swig/CTestTestfileInstall.cmake @@ -19,14 +19,13 @@ 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() - -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 fe222f611..61d1552e1 100644 --- a/src/MEDCoupling_Swig/CTestTestfileInstall.cmake +++ b/src/MEDCoupling_Swig/CTestTestfileInstall.cmake @@ -19,14 +19,13 @@ 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() - -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 fe222f611..61d1552e1 100644 --- a/src/MEDLoader/Swig/CTestTestfileInstall.cmake +++ b/src/MEDLoader/Swig/CTestTestfileInstall.cmake @@ -19,14 +19,13 @@ 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() - -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/ParaMEDMEMTest/CTestTestfileInstall.cmake.in b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in index 2315a4f7b..bbdd65e86 100644 --- a/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in +++ b/src/ParaMEDMEMTest/CTestTestfileInstall.cmake.in @@ -20,46 +20,46 @@ set(MPIEXEC @MPIEXEC@) set(_oversub_opt @_oversub_opt@) -SET(TEST_NAMES ParaMEDMEMTest) +SET(TEST_PREFIX ParaMEDMEMTest) # TestParaMEDMEM set(tfile TestParaMEDMEM_Proc2) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 2 ${_oversub_opt} TestParaMEDMEM) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) set(tfile TestParaMEDMEM_Proc3) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 3 ${_oversub_opt} TestParaMEDMEM) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) set(tfile TestParaMEDMEM_Proc4) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} TestParaMEDMEM) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) set(tfile TestParaMEDMEM_Proc5) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 5 ${_oversub_opt} TestParaMEDMEM) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) # TestMPIAccess set(tfile TestMPIAccess_Proc2) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 2 ${_oversub_opt} TestMPIAccess) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) set(tfile TestMPIAccess_Proc3) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 3 ${_oversub_opt} TestMPIAccess) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) # TestMPIAccessDEC set(tfile TestMPIAccessDEC_Proc4) -set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAMES}_${tfile}) +set(TEST_NAME ${COMPONENT_NAME}_${TEST_PREFIX}_${tfile}) add_test(${TEST_NAME} ${MPIEXEC} -np 4 ${_oversub_opt} TestMPIAccessDEC) set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT}) diff --git a/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in index 38d3c04a1..339ae323d 100644 --- a/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in +++ b/src/ParaMEDMEM_Swig/CTestTestfileInstall.cmake.in @@ -20,37 +20,34 @@ set(MPIEXEC @MPIEXEC@) set(_oversub_opt @_oversub_opt@) -SET(TEST_NAMES ParaMEDMEMTest) +SET(TEST_PREFIX 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_NAMES}_${tfile}) + 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_NAMES}_${tfile}) + 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_NAMES}_${tfile}) + 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_NAMES}_${tfile}) + 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_NAMES}_${tfile}) + 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() \ No newline at end of file +ENDIF() diff --git a/src/PyWrapping/CTestTestfileInstall.cmake b/src/PyWrapping/CTestTestfileInstall.cmake index 37c275f28..3a61734b1 100644 --- a/src/PyWrapping/CTestTestfileInstall.cmake +++ b/src/PyWrapping/CTestTestfileInstall.cmake @@ -19,11 +19,14 @@ 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() -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 e25efe589..73ba1f5bb 100644 --- a/src/RENUMBER_Swig/CTestTestfileInstall.cmake +++ b/src/RENUMBER_Swig/CTestTestfileInstall.cmake @@ -17,11 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(TEST_NAMES - MEDRenumberTest -) - 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) @@ -38,5 +37,5 @@ IF(MEDCOUPLING_BUILD_PY_TESTS) LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT} ENVIRONMENT "PYTHONPATH=../../bin:$ENV{PYTHONPATH}" - ) + ) ENDIF() -- 2.39.2