]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
Rearrange tests vsr/clean_up
authorvsr <vsr@opencascade.com>
Mon, 25 May 2020 18:13:19 +0000 (21:13 +0300)
committervsr <vsr@opencascade.com>
Mon, 25 May 2020 18:13:19 +0000 (21:13 +0300)
src/tests/Test/CMakeLists.txt
src/tests/Test/CTestTestfileInstall.cmake
src/tests/Test/tests.set [new file with mode: 0644]

index 1b1e61533cc7741670beeed4e9222a62621b182d..9099937cc97de1d329a0f3a16ddba80d494161c7 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-# For salome test
-SET(HOMARD_TEST_FILES
-  test_1.py
-  test_2.py
-  test_3.py
-  test_4.py
-  test_5.py
-  test_6.py
-  tutorial_1.py
-  tutorial_2.py
-  tutorial_3.py
-  tutorial_4.py
-  tutorial_5.py
-  tutorial_6.py
-  test_util.py
-)
+INCLUDE(tests.set)
+
+# For make test
+
+SET(SALOME_TEST_DRIVER "${KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+SET(TIMEOUT 500)
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
+FOREACH(tfile ${HOMARD_TEST_FILES})
+  GET_FILENAME_COMPONENT(TEST_NAME ${tfile} NAME_WE)
+  ADD_TEST(NAME ${TEST_NAME}
+           COMMAND ${PYTHON_EXECUTABLE} -B ${SALOME_TEST_DRIVER} ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile})
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
+ENDFOREACH()
+
+# For salome test
 INSTALL(FILES ${HOMARD_TEST_FILES}
         DESTINATION ${SALOME_HOMARD_INSTALL_TEST})
 
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${SALOME_HOMARD_INSTALL_TEST}
-        RENAME CTestTestfile.cmake)
\ No newline at end of file
+        RENAME CTestTestfile.cmake)
+
+INSTALL(FILES tests.set DESTINATION ${SALOME_HOMARD_INSTALL_TEST})
index 08ca692bcb347f51e3642a762649811ad199d81d..dc4154d9eabe52ad1d43ac7bd6ea9aa44f4d18bf 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+INCLUDE(tests.set)
 
+SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
 SET(COMPONENT_NAME HOMARD)
-SET(TIMEOUT        500)
-
-SET(HOMARD_TEST_FILES
-test_1
-test_2
-test_3
-test_4
-test_5
-test_6
-tutorial_1
-tutorial_2
-tutorial_3
-tutorial_4
-tutorial_5
-tutorial_6
-)
+SET(TIMEOUT 500)
 
 FOREACH(tfile ${HOMARD_TEST_FILES})
-  SET(TEST_NAME HOMARD_${tfile})
-  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+  GET_FILENAME_COMPONENT(TEST_NAME ${tfile} NAME_WE)
+  SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+  ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile})
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
diff --git a/src/tests/Test/tests.set b/src/tests/Test/tests.set
new file mode 100644 (file)
index 0000000..7bffd60
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright (C) 2016-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(HOMARD_TEST_FILES
+  test_1.py
+  test_2.py
+  test_3.py
+  test_4.py
+  test_5.py
+  test_6.py
+  tutorial_1.py
+  tutorial_2.py
+  tutorial_3.py
+  tutorial_4.py
+  tutorial_5.py
+  tutorial_6.py
+  test_util.py
+)