-# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2024 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(BLSURFPLUGIN_TEST_FILES
- test_enforced_internal_vertex.py
- test_enforced_vertex.py
- test_periodicity_2D_precad.py
- test_periodicity_2D.py
- test_periodicity_precad.py
- test_periodicity.py
- test_periodicity_reflexion_2D_precad.py
- test_periodicity_reflexion_2D.py
- test_periodicity_reflexion_precad.py
- test_periodicity_reflexion.py
- test_periodicity_with_points_2D_precad.py
- test_precad_intersections.py
- test_sphere.py
- test_precad_keep_gaps.py
-)
-
-INSTALL(FILES ${BLSURFPLUGIN_TEST_FILES} DESTINATION ${SALOME_BLSURFPLUGIN_INSTALL_TESTS})
+INCLUDE(tests.set)
+
+SET(COMPONENT_NAME BLSURFPLUGIN)
+
+SET(TEST_INSTALL_DIRECTORY ${SALOME_BLSURFPLUGIN_INSTALL_TESTS})
+
+# make test
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+
+FOREACH(tfile ${TEST_NAMES})
+ SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ ADD_TEST(NAME ${TEST_NAME}
+ COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+ENDFOREACH()
+
+# salome test
+FOREACH(tfile ${TEST_NAMES})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
+ DESTINATION ${TEST_INSTALL_DIRECTORY})
+ENDFOREACH()
+
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+
+INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
\ No newline at end of file