From 7b519e99b214707d1a363a24331c78ae09facef4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 23 Mar 2015 14:08:46 +0100 Subject: [PATCH] add MEDReader tests --- src/Plugins/MEDReader/Test/CMakeLists.txt | 55 +++++++------------ .../MEDReader/Test/CTestTestfileInstall.cmake | 31 +++++++++++ test/CTestTestfileInstall.cmake | 4 +- 3 files changed, 53 insertions(+), 37 deletions(-) create mode 100644 src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake diff --git a/src/Plugins/MEDReader/Test/CMakeLists.txt b/src/Plugins/MEDReader/Test/CMakeLists.txt index c638bf50..c078cf07 100644 --- a/src/Plugins/MEDReader/Test/CMakeLists.txt +++ b/src/Plugins/MEDReader/Test/CMakeLists.txt @@ -18,39 +18,22 @@ # SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) -ADD_TEST(testMEDReader0 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader0.py) -SET_TESTS_PROPERTIES(testMEDReader0 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader1.py) -SET_TESTS_PROPERTIES(testMEDReader1 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader2.py) -SET_TESTS_PROPERTIES(testMEDReader2 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader3 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader3.py) -SET_TESTS_PROPERTIES(testMEDReader3 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader4 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader4.py) -SET_TESTS_PROPERTIES(testMEDReader4 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader5.py) -SET_TESTS_PROPERTIES(testMEDReader5 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader6 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader6.py) -SET_TESTS_PROPERTIES(testMEDReader6 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader7 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader7.py) -SET_TESTS_PROPERTIES(testMEDReader7 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader8 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader8.py) -SET_TESTS_PROPERTIES(testMEDReader8 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader9 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader9.py) -SET_TESTS_PROPERTIES(testMEDReader9 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader10 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader10.py) -SET_TESTS_PROPERTIES(testMEDReader10 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader11 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader11.py) -SET_TESTS_PROPERTIES(testMEDReader11 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader12 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader12.py) -SET_TESTS_PROPERTIES(testMEDReader12 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader13 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader13.py) -SET_TESTS_PROPERTIES(testMEDReader13 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader14 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader14.py) -SET_TESTS_PROPERTIES(testMEDReader14 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader15 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader15.py) -SET_TESTS_PROPERTIES(testMEDReader15 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader16 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader16.py) -SET_TESTS_PROPERTIES(testMEDReader16 PROPERTIES ENVIRONMENT "${tests_env}") -ADD_TEST(testMEDReader17 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader17.py) -SET_TESTS_PROPERTIES(testMEDReader17 PROPERTIES ENVIRONMENT "${tests_env}") + +SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17) + +FOREACH(tfile ${TEST_NUMBERS}) + ADD_TEST(testMEDReader${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py) + SET_TESTS_PROPERTIES(testMEDReader${tfile} PROPERTIES ENVIRONMENT "${tests_env}") +ENDFOREACH() + +# Application tests +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader) + +FOREACH(tfile ${TEST_NUMBERS}) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py + DESTINATION ${TEST_INSTALL_DIRECTORY}) +ENDFOREACH() + +INSTALL(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) diff --git a/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake b/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake new file mode 100644 index 00000000..31f92373 --- /dev/null +++ b/src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake @@ -0,0 +1,31 @@ +# Copyright (C) 2015 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(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") +SET(COMPONENT_NAME MEDREADER) +SET(TIMEOUT 30) + +SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17) + +FOREACH(tfile ${TEST_NUMBERS}) + SET(TEST_NAME MEDREADER_${tfile}) + #ADD_TEST(${TEST_NAME} python testMEDReader${tfile}.py) + ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testMEDReader${tfile}.py) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") +ENDFOREACH() diff --git a/test/CTestTestfileInstall.cmake b/test/CTestTestfileInstall.cmake index a07611b1..1b13876b 100644 --- a/test/CTestTestfileInstall.cmake +++ b/test/CTestTestfileInstall.cmake @@ -21,6 +21,8 @@ SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_te SET(COMPONENT_NAME PARAVIS) #SET(TIMEOUT 10000) -SET(TIMEOUT 900) +#SET(TIMEOUT 900) +SET(TIMEOUT 300) SUBDIRS(VisuPrs) +SUBDIRS(MEDReader) -- 2.39.2