# 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})
# 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()
--- /dev/null
+# 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
+)