Salome HOME
Adding support of salome test and make test
[plugins/blsurfplugin.git] / tests / CMakeLists.txt
index 07dec0091c8f7dd487c6f1567e050e4e2b6031cf..101290af03a5a911871a999fe39c34b862256a91 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(BLSURFPLUGIN_TEST_FILES
-  test_cadsurf_multithread.py
-  test_enforced_internal_vertex.py
-  test_enforced_vertex.py
-  test_periodicity_2D_precad.py
-  test_periodicity_precad.py
-  test_periodicity_reflexion_2D_precad.py
-  test_periodicity_reflexion_precad.py
-  test_periodicity_with_points_2D_precad.py
-  test_precad_intersections.py
-  test_precad_keep_gaps.py
-  test_proximity.py
-  test_quadrangles_gradation.py
-  test_remove_tiny_edges.py
-  test_sphere.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