]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
add MEDReader tests
authorCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 23 Mar 2015 13:08:46 +0000 (14:08 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 27 Mar 2015 14:45:33 +0000 (15:45 +0100)
src/Plugins/MEDReader/Test/CMakeLists.txt
src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake [new file with mode: 0644]
test/CTestTestfileInstall.cmake

index c638bf508bdeaeb07d4151ed32bfec8fa3d3f2d6..c078cf07b59891861d810c19b33165b251dd0dcc 100644 (file)
 #
 
 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 (file)
index 0000000..31f9237
--- /dev/null
@@ -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()
index a07611b1630c5ec225446451b802b75606e10073..1b13876b7d1aabf9dff20e27c4417287749d65ac 100644 (file)
@@ -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)