From: Anthony Geay Date: Wed, 10 Mar 2021 06:52:20 +0000 (+0100) Subject: Synchronize "make test" with "salome test" X-Git-Tag: V9_7_0a1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b3d87414326afbabaf210f1c844ec2eb2f723c8;p=modules%2Fshaper.git Synchronize "make test" with "salome test" --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 33861baf1..2fbef468f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ SET(${PROJECT_NAME}_MAJOR_VERSION 9) SET(${PROJECT_NAME}_MINOR_VERSION 6) SET(${PROJECT_NAME}_PATCH_VERSION 0) SET(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION}) +SET(COMPONENT_NAME SHAPER) # Ensure a proper linker behavior: CMAKE_POLICY(SET CMP0003 NEW) diff --git a/src/BuildPlugin/CMakeLists.txt b/src/BuildPlugin/CMakeLists.txt index be036a0a6..9b2092c55 100644 --- a/src/BuildPlugin/CMakeLists.txt +++ b/src/BuildPlugin/CMakeLists.txt @@ -115,57 +115,23 @@ INSTALL(TARGETS BuildPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Build) -ADD_UNIT_TESTS(TestVertex.py - TestVertex_ErrorMsg.py - TestVertex_WholeSketch_1.py - TestVertex_WholeSketch_2.py - TestEdge.py - TestEdge_ByPoints.py - TestEdge_ErrorMsg.py - TestEdge_WholeSketch_1.py - TestEdge_WholeSketch_2.py - TestEdge_WholeSketch_3.py - TestEdge_WholeSketch_4.py - TestWire.py - TestWire_ErrorMsg.py - TestWire_WholeSketch_1.py - TestWire_WholeSketch_2.py - TestWire_WholeSketch_3.py - TestWire_WholeSketch_4.py - TestWire_WholeSketch_5.py - TestWire_WholeSketch_6.py - TestPolyline.py - TestInterpolation.py - TestFace.py - TestFace_ErrorMsg.py - TestFace_WholeSketch_1.py - TestFace_WholeSketch_2.py - TestShell.py - TestShell_WholeSketch_1.py - TestShell_WholeSketch_2.py - TestSolid.py - TestSolid_ErrorMsg.py - TestCompSolid.py - TestCompound.py - TestCompound_ErrorMsg.py - TestCompound_History.py - TestSubShapes.py - TestSubShapes_ErrorMsg.py - TestFilling.py - TestFilling_ByEdges.py - TestFilling_ByWires.py - TestFilling_Mixed.py - TestFilling_ErrorMsg.py - Test1920.py - Test2398.py - Test2409.py - Test2415.py - Test2439.py - Test2454.py - Test3125.py - Test3271.py - Test19056.py - Test20469.py - Test20513_1.py - Test20513_2.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/BuildPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/BuildPlugin/CTestTestfileInstall.cmake b/src/BuildPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/BuildPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/BuildPlugin/tests.set b/src/BuildPlugin/tests.set new file mode 100644 index 000000000..fde203508 --- /dev/null +++ b/src/BuildPlugin/tests.set @@ -0,0 +1,74 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestVertex.py + TestVertex_ErrorMsg.py + TestVertex_WholeSketch_1.py + TestVertex_WholeSketch_2.py + TestEdge.py + TestEdge_ByPoints.py + TestEdge_ErrorMsg.py + TestEdge_WholeSketch_1.py + TestEdge_WholeSketch_2.py + TestEdge_WholeSketch_3.py + TestEdge_WholeSketch_4.py + TestWire.py + TestWire_ErrorMsg.py + TestWire_WholeSketch_1.py + TestWire_WholeSketch_2.py + TestWire_WholeSketch_3.py + TestWire_WholeSketch_4.py + TestWire_WholeSketch_5.py + TestWire_WholeSketch_6.py + TestPolyline.py + TestInterpolation.py + TestFace.py + TestFace_ErrorMsg.py + TestFace_WholeSketch_1.py + TestFace_WholeSketch_2.py + TestShell.py + TestShell_WholeSketch_1.py + TestShell_WholeSketch_2.py + TestSolid.py + TestSolid_ErrorMsg.py + TestCompSolid.py + TestCompound.py + TestCompound_ErrorMsg.py + TestCompound_History.py + TestSubShapes.py + TestSubShapes_ErrorMsg.py + TestFilling.py + TestFilling_ByEdges.py + TestFilling_ByWires.py + TestFilling_Mixed.py + TestFilling_ErrorMsg.py + Test1920.py + Test2398.py + Test2409.py + Test2415.py + Test2439.py + Test2454.py + Test3125.py + Test3271.py + Test19056.py + Test20469.py + Test20513_1.py + Test20513_2.py +) \ No newline at end of file diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake index c4e4606f1..76997f6ba 100644 --- a/src/CTestTestfileInstall.cmake +++ b/src/CTestTestfileInstall.cmake @@ -20,8 +20,31 @@ SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") SET(COMPONENT_NAME SHAPER) +set(SALOME_TEST_LABEL_ADV SHAPR_ADV) # Add all test subdirs SUBDIRS(ConnectorAPI HDFs + FeaturesPlugin + ConstructionPlugin + SketchPlugin + ModelAPI + FiltersPlugin + CollectionPlugin + BuildPlugin + ExchangePlugin + PythonAPI + GeomAPI + ModelHighAPI + ParametersPlugin + PythonAddons + SketchAPI + ConstructionAPI + PartSetAPI + GeomDataAPI + Config + ExchangeAPI + ModelGeomAlgo + Locale + test_API ) diff --git a/src/CollectionPlugin/CMakeLists.txt b/src/CollectionPlugin/CMakeLists.txt index bd65ca86a..a14e4f2bc 100644 --- a/src/CollectionPlugin/CMakeLists.txt +++ b/src/CollectionPlugin/CMakeLists.txt @@ -115,56 +115,23 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS( - TestGroup.py - TestGroup2.py - TestField.py - TestGroup1799.py - TestGroupMove01.py - TestGroupMove02.py - TestGroupMove03.py - TestGroupMove04.py - TestGroupMove05.py - TestGroupMove06.py - TestGroupMove07.py - TestGroupMove08.py - TestGroupMove09.py - TestGroupMove10.py - TestGroupMove11.py - TestGroupMove12.py - TestGroupMove13.py - TestGroupMove14.py - TestGroupMove15.py - TestGroupMove16.py - TestGroupMove17.py - TestGroupMove18.py - TestGroupMove19.py - TestGroupMove20.py - TestGroupMove21.py - TestGroupMove22.py - TestGroupMove23.py - TestGroupMove24.py - TestGroupMove25.py - TestGroupMove26.py - TestGroupShareTopology.py - TestGroupAddition.py - TestGroupAddition_Error.py - TestGroupIntersection.py - TestGroupIntersection_Error.py - TestGroupSubstraction.py - TestGroupSubstraction2.py - TestGroupSubstraction_Error1.py - TestGroupSubstraction_Error2.py - Test2977.py - TestGroupWholeResult1.py - TestGroupWholeResult2.py - Test3031.py - TestGroupWholeFeature1.py - TestGroupWholeFeature2.py - TestGroupMoveAndSplit1.py - TestGroupMoveAndSplit2.py - TestGroupMoveAndSplit3.py - TestGroupMoveAndSplit4.py - Test3114.py - Test18739.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/CollectionPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/CollectionPlugin/CTestTestfileInstall.cmake b/src/CollectionPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/CollectionPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/CollectionPlugin/tests.set b/src/CollectionPlugin/tests.set new file mode 100644 index 000000000..387c5af8b --- /dev/null +++ b/src/CollectionPlugin/tests.set @@ -0,0 +1,72 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestGroup.py + TestGroup2.py + TestField.py + TestGroup1799.py + TestGroupMove01.py + TestGroupMove02.py + TestGroupMove03.py + TestGroupMove04.py + TestGroupMove05.py + TestGroupMove06.py + TestGroupMove07.py + TestGroupMove08.py + TestGroupMove09.py + TestGroupMove10.py + TestGroupMove11.py + TestGroupMove12.py + TestGroupMove13.py + TestGroupMove14.py + TestGroupMove15.py + TestGroupMove16.py + TestGroupMove17.py + TestGroupMove18.py + TestGroupMove19.py + TestGroupMove20.py + TestGroupMove21.py + TestGroupMove22.py + TestGroupMove23.py + TestGroupMove24.py + TestGroupMove25.py + TestGroupMove26.py + TestGroupShareTopology.py + TestGroupAddition.py + TestGroupAddition_Error.py + TestGroupIntersection.py + TestGroupIntersection_Error.py + TestGroupSubstraction.py + TestGroupSubstraction2.py + TestGroupSubstraction_Error1.py + TestGroupSubstraction_Error2.py + Test2977.py + TestGroupWholeResult1.py + TestGroupWholeResult2.py + Test3031.py + TestGroupWholeFeature1.py + TestGroupWholeFeature2.py + TestGroupMoveAndSplit1.py + TestGroupMoveAndSplit2.py + TestGroupMoveAndSplit3.py + TestGroupMoveAndSplit4.py + Test3114.py + Test18739.py +) \ No newline at end of file diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index 0f427639d..1881e154f 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -151,7 +151,23 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) - -ADD_UNIT_TESTS( - TestConfig.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Config") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/Config/CTestTestfileInstall.cmake b/src/Config/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/Config/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/Config/tests.set b/src/Config/tests.set new file mode 100644 index 000000000..9035651dd --- /dev/null +++ b/src/Config/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestConfig.py +) diff --git a/src/ConnectorAPI/Test/CMakeLists.txt b/src/ConnectorAPI/Test/CMakeLists.txt index 7e0b4846d..17f37d836 100644 --- a/src/ConnectorAPI/Test/CMakeLists.txt +++ b/src/ConnectorAPI/Test/CMakeLists.txt @@ -19,8 +19,6 @@ INCLUDE(tests.set) -SET(COMPONENT_NAME SHAPER) - SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConnectorAPI") SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) diff --git a/src/ConstructionAPI/CMakeLists.txt b/src/ConstructionAPI/CMakeLists.txt index 562ed30ae..dd1293aa6 100644 --- a/src/ConstructionAPI/CMakeLists.txt +++ b/src/ConstructionAPI/CMakeLists.txt @@ -99,7 +99,23 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConstructionAPI.py DESTINATION ${SHAPE INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestPoint.py - TestAxis.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ConstructionAPI/CTestTestfileInstall.cmake b/src/ConstructionAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ConstructionAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ConstructionAPI/tests.set b/src/ConstructionAPI/tests.set new file mode 100644 index 000000000..e2b4b64a3 --- /dev/null +++ b/src/ConstructionAPI/tests.set @@ -0,0 +1,23 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestPoint.py + TestAxis.py +) diff --git a/src/ConstructionPlugin/CMakeLists.txt b/src/ConstructionPlugin/CMakeLists.txt index 11fd87eaf..6cfa8f698 100644 --- a/src/ConstructionPlugin/CMakeLists.txt +++ b/src/ConstructionPlugin/CMakeLists.txt @@ -77,26 +77,23 @@ INCLUDE_DIRECTORIES( ../GeomDataAPI ) +include(tests.set) -ADD_UNIT_TESTS(TestAxisCreation.py - TestAxis_ErrorMsg.py - UnitTestAxis.py - TestPoint_XYZ.py - TestPoint_IntersectLines.py - TestPoint_IntersectLineAndPlane.py - TestPoint_IntersectPlanes.py - TestPoint_Edge.py - TestPoint_ProjectOnEdge.py - TestPoint_ProjectOnFace.py - TestPoint_GeometricalPropertyCenterOfGravity.py - TestPoint_GeometricalPropertyCenterOfCircle.py - TestPoint_VertexSelection.py - TestPointName.py - TestPoint_ErrorMsg.py - TestPoint_FiniteValidator.py - TestPlane.py - TestPlane_ErrorMsg.py - TestPlane_FaceValidator.py - Test19207.py - Test19471.py -) +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ConstructionPlugin/CTestTestfileInstall.cmake b/src/ConstructionPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..42056d5fe --- /dev/null +++ b/src/ConstructionPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,29 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +#SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") +#SET(TIMEOUT 300) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ConstructionPlugin/tests.set b/src/ConstructionPlugin/tests.set new file mode 100644 index 000000000..09e2211bc --- /dev/null +++ b/src/ConstructionPlugin/tests.set @@ -0,0 +1,42 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestAxisCreation.py + TestAxis_ErrorMsg.py + UnitTestAxis.py + TestPoint_XYZ.py + TestPoint_IntersectLines.py + TestPoint_IntersectLineAndPlane.py + TestPoint_IntersectPlanes.py + TestPoint_Edge.py + TestPoint_ProjectOnEdge.py + TestPoint_ProjectOnFace.py + TestPoint_GeometricalPropertyCenterOfGravity.py + TestPoint_GeometricalPropertyCenterOfCircle.py + TestPoint_VertexSelection.py + TestPointName.py + TestPoint_ErrorMsg.py + TestPoint_FiniteValidator.py + TestPlane.py + TestPlane_ErrorMsg.py + TestPlane_FaceValidator.py + Test19207.py + Test19471.py +) diff --git a/src/ExchangeAPI/CMakeLists.txt b/src/ExchangeAPI/CMakeLists.txt index b61f22ce9..f4cff56e0 100644 --- a/src/ExchangeAPI/CMakeLists.txt +++ b/src/ExchangeAPI/CMakeLists.txt @@ -98,8 +98,23 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ExchangeAPI.py DESTINATION ${SHAPER_IN INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestExchange.py -) - -# ADD_SUBDIRECTORY (Test) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangeAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ExchangeAPI/CTestTestfileInstall.cmake b/src/ExchangeAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ExchangeAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ExchangeAPI/tests.set b/src/ExchangeAPI/tests.set new file mode 100644 index 000000000..91b3054d0 --- /dev/null +++ b/src/ExchangeAPI/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestExchange.py +) diff --git a/src/ExchangePlugin/CMakeLists.txt b/src/ExchangePlugin/CMakeLists.txt index 3df98bece..44b201d65 100644 --- a/src/ExchangePlugin/CMakeLists.txt +++ b/src/ExchangePlugin/CMakeLists.txt @@ -108,43 +108,23 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS( - TestImport.py - TestExport.py - Test2290.py - Test2459.py - Test18710.py - TestExportToXAOWithFields.py - TestExportToXAOWithGroupNotUpdated.py - TestExport_FiniteValidator.py - TestExportPart_Failure_1.py - TestExportPart_Failure_2.py - TestExportPart_Failure_3.py - TestExportPart_FullPartSet.py - TestExportPart_FullPart_1.py - TestExportPart_FullPart_2.py - TestExportPart_PartSet.py - TestExportPart_Results_1.py - TestExportPart_Results_2.py - TestExportPart_Results_3.py - TestExportPart_Results_4.py - TestExportPart_Results_5.py - TestExportPart_Results_6.py - TestExportPart_Results_7.py - TestExportPart_Results_8.py - TestImportPart_AfterCurrent_1.py - TestImportPart_AfterCurrent_2.py - TestImportPart_AfterLast_1.py - TestImportPart_AfterLast_2.py - TestImportPart_AfterLast_3.py - TestImportPart_AfterLast_4.py - TestImportPart_AfterLast_5.py - TestImportPart_AfterLast_6.py - TestImportPart_Construction_1.py - TestImportPart_Construction_2.py - TestImportPart_Construction_3.py - TestImportPart_Construction_4.py - TestImportPart_Multiple.py - TestImportPart_ToEmptyPart.py - TestImportPart_ToEmptyPartSet.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangePlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ExchangePlugin/CTestTestfileInstall.cmake b/src/ExchangePlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ExchangePlugin/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ExchangePlugin/tests.set b/src/ExchangePlugin/tests.set new file mode 100644 index 000000000..5fb4781f9 --- /dev/null +++ b/src/ExchangePlugin/tests.set @@ -0,0 +1,59 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestImport.py + TestExport.py + Test2290.py + Test2459.py + Test18710.py + TestExportToXAOWithFields.py + TestExportToXAOWithGroupNotUpdated.py + TestExport_FiniteValidator.py + TestExportPart_Failure_1.py + TestExportPart_Failure_2.py + TestExportPart_Failure_3.py + TestExportPart_FullPartSet.py + TestExportPart_FullPart_1.py + TestExportPart_FullPart_2.py + TestExportPart_PartSet.py + TestExportPart_Results_1.py + TestExportPart_Results_2.py + TestExportPart_Results_3.py + TestExportPart_Results_4.py + TestExportPart_Results_5.py + TestExportPart_Results_6.py + TestExportPart_Results_7.py + TestExportPart_Results_8.py + TestImportPart_AfterCurrent_1.py + TestImportPart_AfterCurrent_2.py + TestImportPart_AfterLast_1.py + TestImportPart_AfterLast_2.py + TestImportPart_AfterLast_3.py + TestImportPart_AfterLast_4.py + TestImportPart_AfterLast_5.py + TestImportPart_AfterLast_6.py + TestImportPart_Construction_1.py + TestImportPart_Construction_2.py + TestImportPart_Construction_3.py + TestImportPart_Construction_4.py + TestImportPart_Multiple.py + TestImportPart_ToEmptyPart.py + TestImportPart_ToEmptyPartSet.py +) \ No newline at end of file diff --git a/src/FeaturesPlugin/CMakeLists.txt b/src/FeaturesPlugin/CMakeLists.txt index 6d01dc466..0d2e4edf9 100644 --- a/src/FeaturesPlugin/CMakeLists.txt +++ b/src/FeaturesPlugin/CMakeLists.txt @@ -206,507 +206,25 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS(TestExtrusion.py - TestExtrusionOfCompound.py - TestExtrusionCut.py - TestExtrusionCut_BySize.py - TestExtrusionCut_ByPlanesAndOffsets.py - TestExtrusionCut_ByFaces.py - TestExtrusionCut_ThroughAll.py - TestExtrusionFuse.py - TestExtrusionFuse_BySize.py - TestExtrusionFuse_ByPlanesAndOffsets.py - TestExtrusionFuse_ThroughAll.py - TestExtrusion_ErrorMsg.py - TestExtrusion_ZeroOffsetError.py - TestExtrusion_ByFaces01.py - TestExtrusion_ByFaces02.py - TestExtrusion_ByFaces03.py - TestExtrusion_ByFaces04.py - TestExtrusion_ByFaces05.py - TestExtrusion_ByFaces06.py - TestExtrusion_ByFaces07.py - TestExtrusion_ByFaces08.py - TestExtrusion_ByFaces09.py - TestExtrusion_ByFaces10.py - TestExtrusion_ByFaces11.py - TestExtrusion_ByFaces12.py - TestExtrusion_ByFaces13.py - TestExtrusion_ByFaces14.py - TestExtrusion_ByFaces15.py - TestExtrusion_ByFaces16.py - TestExtrusion_ByFaces17.py - TestExtrusion_ByFaces18.py - TestExtrusion_ByFaces19.py - TestRevolution.py - TestRevolution_ByAngle.py - TestRevolutionOfPoint.py - TestRevolutionOfEdge.py - TestRevolutionOfCompound.py - TestRevolutionCut.py - TestRevolutionCut_ByAngle.py - TestRevolutionCut_ByPlanesAndOffsets.py - TestRevolutionCut_ThroughAll.py - TestRevolutionFuse.py - TestRevolutionFuse_ByAngle.py - TestRevolutionFuse_ByPlanesAndOffsets.py - TestRevolutionFuse_ThroughAll.py - TestCompositeFeaturesOnCompSolids.py - TestPartition.py - TestPartition_ErrorMsg.py - TestPlacement_Vertex_Vertex.py - TestPlacement_Edge_Vertex.py - TestPlacement_Edge_Edge.py - TestPlacement_Face_Vertex.py - TestPlacement_Face_Edge.py - TestPlacement_Face_Face.py - TestPlacement_Part_Part.py - TestPlacement_Complex.py - TestPlacement_ErrorMsg.py - TestPlacement_BodyShapesValidator.py - TestTranslation.py - TestTranslation_Part.py - TestRotation.py - TestRotation_ByAxis.py - TestRotation_ByPoints.py - TestRotation_ErrorMsg.py - TestMultiRotation_Part.py - TestMultiRotation_ErrorMsg.py - TestMultiTranslation_Part.py - TestMultiTranslation_ErrorMsg.py - TestSymmetry_Part.py - TestBoolean1.py - TestBoolean2.py - TestBoolean3.py - TestBooleanCompSolids.py - TestBooleanSmash.py - TestBooleanSplit.py - TestBooleanSplitWithPlane.py - TestBooleanSplit_ErrorMsg.py - TestMultiBoolean.py - TestSerialBoolean.py - TestBoolean_ErrorMsg.py - TestIntersection.py - TestIntersection_ErrorMsg.py - TestUnion.py - TestUnionFaces.py - TestUnion_ErrorMsg.py - TestRemoveSubShapes.py - TestRemoveSubShapes2.py - TestRemoveSubShapes3.py - TestRemoveSubShapes4.py - TestRemoveSubShapes5.py - TestRemoveSubShapes6.py - TestPipe.py - TestPipe_Edge.py - TestPipe_Wire.py - TestPipe_Compound.py - TestPipe_ErrorMsg.py - TestRecover.py - TestRecover_Compound.py - TestRecover_Compsolid1.py - TestRecover_Compsolid2.py - TestRecover1798.py - TestSplitEdgeVertex.py - TestSplitEdgeEdge.py - TestSplitEdgeEdgeIntersected.py - TestSplitEdgeWire.py - TestSplitEdgeFace.py - TestSplitEdgeShell.py - TestSplitEdgeSolid.py - TestSplitEdgeSolidIntersected.py - TestSplitWireVertex.py - TestSplitWireEdge.py - TestSplitWireWire.py - TestSplitWireFace.py - TestSplitWireShell.py - TestSplitWireSolid.py - TestSplitFaceVertex.py - TestSplitFaceEdge.py - TestSplitFaceEdgeInside.py - TestSplitFaceEdgePerpendicular.py - TestSplitFaceWire.py - TestSplitFaceFace.py - TestSplitFaceShell.py - TestSplitFaceSolid.py - TestSplitCompFaceSolid.py - TestSplitShellVertex.py - TestSplitShellEdge.py - TestSplitShellConstrPlane.py - TestSplitShellWire.py - TestSplitShellFace.py - TestSplitShellShell.py - TestSplitShellSolid.py - TestSplitSolid2ConstructionPlanes.py - TestSplitSolidEdge.py - TestSplitSolidFace.py - TestSplitSolidCompFace.py - TestSplitSolidShell.py - TestSplitSolidCompShell.py - TestSplitCompsolidPlane.py - TestPartition2Faces.py - TestPartition2Solids.py - TestPartition2Wires.py - TestPartitionBox4Planes.py - TestPartitionEdgeSolid.py - TestPartitionFace2Solid.py - TestPartitionFaceSolid.py - TestPartitionFaceWire.py - TestPartitionInclinedFaceSolid.py - TestPartitionWireFaceSolid.py - TestUnion4CurvedFaces.py - TestUnion4CurvedFaces_2.py - TestUnion4Faces.py - TestUnionOfUnion.py - TestMeasurementLength.py - TestMeasurementDistance.py - TestMeasurementRadius.py - TestMeasurementAngle.py - TestMeasurementAngle3Points.py - TestMeasurementPresentation.py - TestFusionFaces.py - TestFusionFaces2697.py - Test1379.py - Test1922.py - Test1942.py - Test1915.py - Test2023.py - Test2046.py - Test2038.py - Test2172.py - Test2194.py - Test2197_1.py - Test2197_2.py - Test2197_3.py - Test2197_4.py - Test2215.py - Test2222.py - Test2233.py - Test2231.py - Test2240.py - Test2246.py - Test2248.py - Test2251.py - Test2255.py - Test2289.py - Test2304.py - Test2304_2.py - Test2375.py - Test2377.py - Test2394.py - Test2395.py - Test2419_1.py - Test2419_2.py - Test2419_3.py - Test2465.py - Test2495.py - Test2514.py - Test2520.py - TestBooleanCut_CompSolid_CompSolid.py - TestBooleanCut_CompSolidCompound_CompSolidCompound.py - TestBooleanCut_Edge_Edge.py - TestBooleanCut_Edge_Face.py - TestBooleanCut_EdgeCompound_EdgeCompound.py - TestBooleanCut_EdgeCompound_Solid.py - TestBooleanCut_Face_Face.py - TestBooleanCut_Face_Solid.py - TestBooleanCut_FaceCompound_FaceCompound.py - TestBooleanCut_Shell_Shell.py - TestBooleanCut_ShellCompound_ShellCompound.py - TestBooleanCut_Solid_Solid.py - TestBooleanCut_SolidCompound_SolidCompound.py - TestBooleanCut_Vertex_Vertex.py - TestBooleanCut_VertexCompound_Solid.py - TestBooleanCut_VertexCompound_VertexCompound.py - TestBooleanCut_Wire_Face.py - TestBooleanCut_Wire_Wire.py - TestBooleanCut_WireCompound_WireCompound.py - TestBooleanCut_Compound_Solid.py - TestBooleanCut_ErrorMsg.py - TestBooleanCut_SolidsHistory.py - TestBooleanSmash_Face_Face.py - TestBooleanSmash_SubSolid_Solid.py - TestBooleanSmash_CompSolid_Solid.py - TestBooleanSmash_ErrorMsg.py - TestBooleanSmash_SolidsHistory.py - TestBooleanFuse_SimpleMode.py - TestBooleanFuse_RemoveEdges.py - TestBooleanFuse_ErrorMsg.py - TestBooleanCommon_Vertex_Vertex.py - TestBooleanCommon_VertexCompound_VertexCompound.py - TestBooleanCommon_Edge_Edge.py - TestBooleanCommon_EdgeCompound_EdgeCompound.py - TestBooleanCommon_Wire_Wire.py - TestBooleanCommon_WireCompound_WireCompound.py - TestBooleanCommon_Face_Face.py - TestBooleanCommon_Face_Plane.py - TestBooleanCommon_FaceCompound_FaceCompound.py - TestBooleanCommon_Shell_Shell.py - TestBooleanCommon_ShellCompound_ShellCompound.py - TestBooleanCommon_Solid_Face.py - TestBooleanCommon_Solid_Shell.py - TestBooleanCommon_Solid_Solid.py - TestBooleanCommon_SolidCompound_Face.py - TestBooleanCommon_SolidCompound_Shell.py - TestBooleanCommon_SolidCompound_SolidCompound.py - TestBooleanCommon_SubCompound_Solid.py - TestBooleanCommon_SubSolid_Solid.py - TestBooleanCommon_CompSolid_Face.py - TestBooleanCommon_CompSolid_Shell.py - TestBooleanCommon_CompSolid_CompSolid.py - TestBooleanCommon_CompSolidCompound_Face.py - TestBooleanCommon_CompSolidCompound_Shell.py - TestBooleanCommon_CompSolidCompound_CompSolidCompound.py - TestBooleanCommon_ErrorMsg.py - TestBooleanCommon_SolidsHistory.py - Test2596.py - Test2592.py - Test2588.py - Test1467.py - TestPartitionSubCompsolidWithCompSolid1.py - TestPartitionSubCompsolidWithCompSolid2.py - TestPartitionSubCompsolidWithCompSolid3.py - TestPartitionSubCompsolidWithSolid1.py - TestPartitionSubCompsolidWithSolid2.py - TestPartitionSubCompsolidWithSolid3.py - TestPartitionSubCompsolidWithSolid4.py - TestPartitionSubCompsolidWithSolid5.py - TestPartitionSubCompsolidWithFace1.py - TestPartitionSubCompsolidWithFace2.py - TestPartitionSubCompsolidWithFace3.py - TestPartitionSubCompsolidWithFace4.py - TestPartitionSubCompsolidWithFace5.py - TestPartitionSubCompsolidWithPlane1.py - TestPartitionSubCompsolidWithPlane2.py - TestPartitionSubCompsolidWithPlane3.py - TestPartitionSubCompsolidWithPlane4.py - TestPartitionSubCompsolidWithPlane5.py - TestPartitionArgsUpdate.py - TestPartition_SolidsHistory.py - TestBooleanFuse_Vertex_Vertex.py - TestBooleanFuse_VertexCompound_VertexCompound.py - TestBooleanFuse_Edge_Edge.py - TestBooleanFuse_EdgeCompound_EdgeCompound.py - TestBooleanFuse_Wire_Wire.py - TestBooleanFuse_WireCompound_WireCompound.py - TestBooleanFuse_Face_Face.py - TestBooleanFuse_FaceCompound_FaceCompound.py - TestBooleanFuse_Shell_Shell.py - TestBooleanFuse_ShellCompound_ShellCompound.py - TestBooleanFuse_Solid_Solid.py - TestBooleanFuse_SolidCompound_SolidCompound.py - TestBooleanFuse_CompSolid_Face.py - TestBooleanFuse_CompSolid_CompSolid.py - TestBooleanFuse_CompSolidCompound_CompSolidCompound.py - TestBooleanFuse_SolidsHistory.py - TestFillet.py - TestFillet1.py - TestFillet_ErrorMsg.py - TestFillet_History.py - TestScale1.py - TestScale2.py - Test1816.py - Test1876.py - Test2225.py - Test2631.py - Test2636.py - Test2650.py - Test2681.py - Test2686.py - Test2689.py - Test2693.py - Test2698.py - Test2701.py - Test2724.py - Test2692.py - Test2617.py - Test2729.py - Test2738.py - Test2751.py - Test2826.py - Test2854.py - Test2878.py - Test2920.py - Test2971.py - Test3014.py - TestBooleanCommon_MultiLevelCompound_v0_1.py - TestBooleanCommon_MultiLevelCompound_v0_2.py - TestBooleanCommon_MultiLevelCompound_v20190506_1.py - TestBooleanCommon_MultiLevelCompound_v20190506_2.py - TestBooleanCut_MultiLevelCompound_v0_1.py - TestBooleanCut_MultiLevelCompound_v0_2.py - TestBooleanCut_MultiLevelCompound_v20190506_1.py - TestBooleanCut_MultiLevelCompound_v20190506_2.py - TestBooleanFuse_MultiLevelCompound_v0_1.py - TestBooleanFuse_MultiLevelCompound_v0_2.py - TestBooleanFuse_MultiLevelCompound_v0_3.py - TestBooleanFuse_MultiLevelCompound_v0_4.py - TestBooleanFuse_MultiLevelCompound_v20190506_1.py - TestBooleanFuse_MultiLevelCompound_v20190506_2.py - TestBooleanFuse_MultiLevelCompound_v20190506_3.py - TestBooleanFuse_MultiLevelCompound_v20190506_4.py - TestBooleanSmash_MultiLevelCompound_v0_1.py - TestBooleanSmash_MultiLevelCompound_v0_2.py - TestBooleanSmash_MultiLevelCompound_v20190506_1.py - TestBooleanSmash_MultiLevelCompound_v20190506_2.py - TestBooleanSplit_MultiLevelCompound_v0_1.py - TestBooleanSplit_MultiLevelCompound_v0_2.py - TestBooleanSplit_MultiLevelCompound_v20190506_1.py - TestBooleanSplit_MultiLevelCompound_v20190506_2.py - TestPartition_MultiLevelCompound_v0_1.py - TestPartition_MultiLevelCompound_v0_2.py - TestPartition_MultiLevelCompound_v0_3.py - TestPartition_MultiLevelCompound_v20190506_1.py - TestPartition_MultiLevelCompound_v20190506_2.py - TestPartition_MultiLevelCompound_v20190506_3.py - TestUnion_MultiLevelCompound_v0.py - TestUnion_MultiLevelCompound_v20190506.py - TestUnionFaces_v20190506.py - TestRemoveResultsBody.py - TestRemoveResultsConstruction.py - TestRemoveResultsPart.py - Test17000.py - Test17261.py - Test17281.py - TestChamfer.py - Test3033.py - Test3076.py - Test17909.py - TestCopy_ErrorMsg.py - TestCopyFeature.py - TestCopyFeatureMoveGroupOfFeature.py - TestCopyMoveResult.py - TestCopyMoveSubShapes.py - TestCopyNames.py - TestCopySubShapes.py - TestCopyWholeFeature.py - TestImportResult.py - TestDefeaturing_ErrorMsg.py - TestDefeaturing_OnSolid1.py - TestDefeaturing_OnSolid2.py - TestDefeaturing_OnSolid3.py - TestDefeaturing_OnCompsolid1.py - TestDefeaturing_OnCompsolid2.py - TestDefeaturing_OnCompsolid3.py - TestDefeaturing_OnCompound.py - Test3137_1.py - Test3137_2.py - Test2918.py - Test3139.py - TestPlacement_MultiLevelCompound_v0_1.py - TestPlacement_MultiLevelCompound_v0_2.py - TestPlacement_MultiLevelCompound_v0_3.py - TestPlacement_MultiLevelCompound_v0_4.py - TestPlacement_MultiLevelCompound_v0_5.py - TestPlacement_MultiLevelCompound_v0_6.py - TestPlacement_MultiLevelCompound_v95_1.py - TestPlacement_MultiLevelCompound_v95_2.py - TestPlacement_MultiLevelCompound_v95_3.py - TestPlacement_MultiLevelCompound_v95_4.py - TestPlacement_MultiLevelCompound_v95_5.py - TestPlacement_MultiLevelCompound_v95_6.py - TestTranslation_MultiLevelCompound_v0_1.py - TestTranslation_MultiLevelCompound_v0_2.py - TestTranslation_MultiLevelCompound_v0_3.py - TestTranslation_MultiLevelCompound_v0_4.py - TestTranslation_MultiLevelCompound_v0_5.py - TestTranslation_MultiLevelCompound_v95_1.py - TestTranslation_MultiLevelCompound_v95_2.py - TestTranslation_MultiLevelCompound_v95_3.py - TestTranslation_MultiLevelCompound_v95_4.py - TestTranslation_MultiLevelCompound_v95_5.py - TestRotation_MultiLevelCompound_v0_1.py - TestRotation_MultiLevelCompound_v0_2.py - TestRotation_MultiLevelCompound_v0_3.py - TestRotation_MultiLevelCompound_v0_4.py - TestRotation_MultiLevelCompound_v95_1.py - TestRotation_MultiLevelCompound_v95_2.py - TestRotation_MultiLevelCompound_v95_3.py - TestRotation_MultiLevelCompound_v95_4.py - TestSymmetry_MultiLevelCompound_v0_1.py - TestSymmetry_MultiLevelCompound_v0_2.py - TestSymmetry_MultiLevelCompound_v0_3.py - TestSymmetry_MultiLevelCompound_v0_4.py - TestSymmetry_MultiLevelCompound_v0_5.py - TestSymmetry_MultiLevelCompound_v95_1.py - TestSymmetry_MultiLevelCompound_v95_2.py - TestSymmetry_MultiLevelCompound_v95_3.py - TestSymmetry_MultiLevelCompound_v95_4.py - TestSymmetry_MultiLevelCompound_v95_5.py - TestScale_MultiLevelCompound_v0_1.py - TestScale_MultiLevelCompound_v0_2.py - TestScale_MultiLevelCompound_v0_3.py - TestScale_MultiLevelCompound_v0_4.py - TestScale_MultiLevelCompound_v95_1.py - TestScale_MultiLevelCompound_v95_2.py - TestScale_MultiLevelCompound_v95_3.py - TestScale_MultiLevelCompound_v95_4.py - TestMultiTranslation_MultiLevelCompound_v0_1.py - TestMultiTranslation_MultiLevelCompound_v0_2.py - TestMultiTranslation_MultiLevelCompound_v0_3.py - TestMultiTranslation_MultiLevelCompound_v0_4.py - TestMultiTranslation_MultiLevelCompound_v95_1.py - TestMultiTranslation_MultiLevelCompound_v95_2.py - TestMultiTranslation_MultiLevelCompound_v95_3.py - TestMultiTranslation_MultiLevelCompound_v95_4.py - TestMultiRotation_MultiLevelCompound_v0_1.py - TestMultiRotation_MultiLevelCompound_v0_2.py - TestMultiRotation_MultiLevelCompound_v0_3.py - TestMultiRotation_MultiLevelCompound_v0_4.py - TestMultiRotation_MultiLevelCompound_v95_1.py - TestMultiRotation_MultiLevelCompound_v95_2.py - TestMultiRotation_MultiLevelCompound_v95_3.py - TestMultiRotation_MultiLevelCompound_v95_4.py - TestIntersection_MultiLevelCompound_v0_1.py - TestIntersection_MultiLevelCompound_v0_2.py - TestIntersection_MultiLevelCompound_v95_1.py - TestIntersection_MultiLevelCompound_v95_2.py - TestFillet_MultiLevelCompound_v0_1.py - TestFillet_MultiLevelCompound_v0_2.py - TestFillet_MultiLevelCompound_v0_3.py - TestFillet_MultiLevelCompound_v0_4.py - TestFillet_MultiLevelCompound_v95_1.py - TestFillet_MultiLevelCompound_v95_2.py - TestFillet_MultiLevelCompound_v95_3.py - TestFillet_MultiLevelCompound_v95_4.py - TestChamfer_MultiLevelCompound_v0_1.py - TestChamfer_MultiLevelCompound_v0_2.py - TestChamfer_MultiLevelCompound_v0_3.py - TestChamfer_MultiLevelCompound_v0_4.py - TestChamfer_MultiLevelCompound_v95_1.py - TestChamfer_MultiLevelCompound_v95_2.py - TestChamfer_MultiLevelCompound_v95_3.py - TestChamfer_MultiLevelCompound_v95_4.py - Test18836.py - Test2817.py - Test19065.py - Test19066.py - Test19115.py - Test19196.py - TestFillet1D_ErrorMsg.py - TestFillet1D_Vertices_1.py - TestFillet1D_Vertices_2.py - TestFillet1D_Vertices_3.py - TestFillet1D_Vertices_4.py - TestFillet1D_Vertices_5.py - TestFillet1D_Vertices_6.py - TestFillet1D_Vertices_7.py - TestFillet1D_Vertices_8.py - TestFillet1D_Vertices_9.py - TestFillet1D_Wire_1.py - TestFillet1D_Wire_2.py - TestFillet1D_Wire_3.py - TestFillet1D_Wire_4.py - TestFillet1D_Wire_5.py - Test19931.py - Test20027.py - Test20245_1.py - Test20245_2.py - Test20245_3.py - Test20247.py - Test22847.py - TestPointCoordinates.py - TestGeometryCalculation.py - TestBoundingBox.py - Test23885.py +INCLUDE(tests.set) + +ADD_UNIT_TESTS( + ${TEST_NAMES} ) + +IF(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FeaturesPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +ENDIF(${HAVE_SALOME}) diff --git a/src/FeaturesPlugin/CTestTestfileInstall.cmake b/src/FeaturesPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..42056d5fe --- /dev/null +++ b/src/FeaturesPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,29 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +#SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") +#SET(TIMEOUT 300) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/FeaturesPlugin/tests.set b/src/FeaturesPlugin/tests.set new file mode 100644 index 000000000..404476a40 --- /dev/null +++ b/src/FeaturesPlugin/tests.set @@ -0,0 +1,524 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestExtrusion.py + TestExtrusionOfCompound.py + TestExtrusionCut.py + TestExtrusionCut_BySize.py + TestExtrusionCut_ByPlanesAndOffsets.py + TestExtrusionCut_ByFaces.py + TestExtrusionCut_ThroughAll.py + TestExtrusionFuse.py + TestExtrusionFuse_BySize.py + TestExtrusionFuse_ByPlanesAndOffsets.py + TestExtrusionFuse_ThroughAll.py + TestExtrusion_ErrorMsg.py + TestExtrusion_ZeroOffsetError.py + TestExtrusion_ByFaces01.py + TestExtrusion_ByFaces02.py + TestExtrusion_ByFaces03.py + TestExtrusion_ByFaces04.py + TestExtrusion_ByFaces05.py + TestExtrusion_ByFaces06.py + TestExtrusion_ByFaces07.py + TestExtrusion_ByFaces08.py + TestExtrusion_ByFaces09.py + TestExtrusion_ByFaces10.py + TestExtrusion_ByFaces11.py + TestExtrusion_ByFaces12.py + TestExtrusion_ByFaces13.py + TestExtrusion_ByFaces14.py + TestExtrusion_ByFaces15.py + TestExtrusion_ByFaces16.py + TestExtrusion_ByFaces17.py + TestExtrusion_ByFaces18.py + TestExtrusion_ByFaces19.py + TestRevolution.py + TestRevolution_ByAngle.py + TestRevolutionOfPoint.py + TestRevolutionOfEdge.py + TestRevolutionOfCompound.py + TestRevolutionCut.py + TestRevolutionCut_ByAngle.py + TestRevolutionCut_ByPlanesAndOffsets.py + TestRevolutionCut_ThroughAll.py + TestRevolutionFuse.py + TestRevolutionFuse_ByAngle.py + TestRevolutionFuse_ByPlanesAndOffsets.py + TestRevolutionFuse_ThroughAll.py + TestCompositeFeaturesOnCompSolids.py + TestPartition.py + TestPartition_ErrorMsg.py + TestPlacement_Vertex_Vertex.py + TestPlacement_Edge_Vertex.py + TestPlacement_Edge_Edge.py + TestPlacement_Face_Vertex.py + TestPlacement_Face_Edge.py + TestPlacement_Face_Face.py + TestPlacement_Part_Part.py + TestPlacement_Complex.py + TestPlacement_ErrorMsg.py + TestPlacement_BodyShapesValidator.py + TestTranslation.py + TestTranslation_Part.py + TestRotation.py + TestRotation_ByAxis.py + TestRotation_ByPoints.py + TestRotation_ErrorMsg.py + TestMultiRotation_Part.py + TestMultiRotation_ErrorMsg.py + TestMultiTranslation_Part.py + TestMultiTranslation_ErrorMsg.py + TestSymmetry_Part.py + TestBoolean1.py + TestBoolean2.py + TestBoolean3.py + TestBooleanCompSolids.py + TestBooleanSmash.py + TestBooleanSplit.py + TestBooleanSplitWithPlane.py + TestBooleanSplit_ErrorMsg.py + TestMultiBoolean.py + TestSerialBoolean.py + TestBoolean_ErrorMsg.py + TestIntersection.py + TestIntersection_ErrorMsg.py + TestUnion.py + TestUnionFaces.py + TestUnion_ErrorMsg.py + TestRemoveSubShapes.py + TestRemoveSubShapes2.py + TestRemoveSubShapes3.py + TestRemoveSubShapes4.py + TestRemoveSubShapes5.py + TestRemoveSubShapes6.py + TestPipe.py + TestPipe_Edge.py + TestPipe_Wire.py + TestPipe_Compound.py + TestPipe_ErrorMsg.py + TestRecover.py + TestRecover_Compound.py + TestRecover_Compsolid1.py + TestRecover_Compsolid2.py + TestRecover1798.py + TestSplitEdgeVertex.py + TestSplitEdgeEdge.py + TestSplitEdgeEdgeIntersected.py + TestSplitEdgeWire.py + TestSplitEdgeFace.py + TestSplitEdgeShell.py + TestSplitEdgeSolid.py + TestSplitEdgeSolidIntersected.py + TestSplitWireVertex.py + TestSplitWireEdge.py + TestSplitWireWire.py + TestSplitWireFace.py + TestSplitWireShell.py + TestSplitWireSolid.py + TestSplitFaceVertex.py + TestSplitFaceEdge.py + TestSplitFaceEdgeInside.py + TestSplitFaceEdgePerpendicular.py + TestSplitFaceWire.py + TestSplitFaceFace.py + TestSplitFaceShell.py + TestSplitFaceSolid.py + TestSplitCompFaceSolid.py + TestSplitShellVertex.py + TestSplitShellEdge.py + TestSplitShellConstrPlane.py + TestSplitShellWire.py + TestSplitShellFace.py + TestSplitShellShell.py + TestSplitShellSolid.py + TestSplitSolid2ConstructionPlanes.py + TestSplitSolidEdge.py + TestSplitSolidFace.py + TestSplitSolidCompFace.py + TestSplitSolidShell.py + TestSplitSolidCompShell.py + TestSplitCompsolidPlane.py + TestPartition2Faces.py + TestPartition2Solids.py + TestPartition2Wires.py + TestPartitionBox4Planes.py + TestPartitionEdgeSolid.py + TestPartitionFace2Solid.py + TestPartitionFaceSolid.py + TestPartitionFaceWire.py + TestPartitionInclinedFaceSolid.py + TestPartitionWireFaceSolid.py + TestUnion4CurvedFaces.py + TestUnion4CurvedFaces_2.py + TestUnion4Faces.py + TestUnionOfUnion.py + TestMeasurementLength.py + TestMeasurementDistance.py + TestMeasurementRadius.py + TestMeasurementAngle.py + TestMeasurementAngle3Points.py + TestMeasurementPresentation.py + TestFusionFaces.py + TestFusionFaces2697.py + Test1379.py + Test1922.py + Test1942.py + Test1915.py + Test2023.py + Test2046.py + Test2038.py + Test2172.py + Test2194.py + Test2197_1.py + Test2197_2.py + Test2197_3.py + Test2197_4.py + Test2215.py + Test2222.py + Test2233.py + Test2231.py + Test2240.py + Test2246.py + Test2248.py + Test2251.py + Test2255.py + Test2289.py + Test2304.py + Test2304_2.py + Test2375.py + Test2377.py + Test2394.py + Test2395.py + Test2419_1.py + Test2419_2.py + Test2419_3.py + Test2465.py + Test2495.py + Test2514.py + Test2520.py + TestBooleanCut_CompSolid_CompSolid.py + TestBooleanCut_CompSolidCompound_CompSolidCompound.py + TestBooleanCut_Edge_Edge.py + TestBooleanCut_Edge_Face.py + TestBooleanCut_EdgeCompound_EdgeCompound.py + TestBooleanCut_EdgeCompound_Solid.py + TestBooleanCut_Face_Face.py + TestBooleanCut_Face_Solid.py + TestBooleanCut_FaceCompound_FaceCompound.py + TestBooleanCut_Shell_Shell.py + TestBooleanCut_ShellCompound_ShellCompound.py + TestBooleanCut_Solid_Solid.py + TestBooleanCut_SolidCompound_SolidCompound.py + TestBooleanCut_Vertex_Vertex.py + TestBooleanCut_VertexCompound_Solid.py + TestBooleanCut_VertexCompound_VertexCompound.py + TestBooleanCut_Wire_Face.py + TestBooleanCut_Wire_Wire.py + TestBooleanCut_WireCompound_WireCompound.py + TestBooleanCut_Compound_Solid.py + TestBooleanCut_ErrorMsg.py + TestBooleanCut_SolidsHistory.py + TestBooleanSmash_Face_Face.py + TestBooleanSmash_SubSolid_Solid.py + TestBooleanSmash_CompSolid_Solid.py + TestBooleanSmash_ErrorMsg.py + TestBooleanSmash_SolidsHistory.py + TestBooleanFuse_SimpleMode.py + TestBooleanFuse_RemoveEdges.py + TestBooleanFuse_ErrorMsg.py + TestBooleanCommon_Vertex_Vertex.py + TestBooleanCommon_VertexCompound_VertexCompound.py + TestBooleanCommon_Edge_Edge.py + TestBooleanCommon_EdgeCompound_EdgeCompound.py + TestBooleanCommon_Wire_Wire.py + TestBooleanCommon_WireCompound_WireCompound.py + TestBooleanCommon_Face_Face.py + TestBooleanCommon_Face_Plane.py + TestBooleanCommon_FaceCompound_FaceCompound.py + TestBooleanCommon_Shell_Shell.py + TestBooleanCommon_ShellCompound_ShellCompound.py + TestBooleanCommon_Solid_Face.py + TestBooleanCommon_Solid_Shell.py + TestBooleanCommon_Solid_Solid.py + TestBooleanCommon_SolidCompound_Face.py + TestBooleanCommon_SolidCompound_Shell.py + TestBooleanCommon_SolidCompound_SolidCompound.py + TestBooleanCommon_SubCompound_Solid.py + TestBooleanCommon_SubSolid_Solid.py + TestBooleanCommon_CompSolid_Face.py + TestBooleanCommon_CompSolid_Shell.py + TestBooleanCommon_CompSolid_CompSolid.py + TestBooleanCommon_CompSolidCompound_Face.py + TestBooleanCommon_CompSolidCompound_Shell.py + TestBooleanCommon_CompSolidCompound_CompSolidCompound.py + TestBooleanCommon_ErrorMsg.py + TestBooleanCommon_SolidsHistory.py + Test2596.py + Test2592.py + Test2588.py + Test1467.py + TestPartitionSubCompsolidWithCompSolid1.py + TestPartitionSubCompsolidWithCompSolid2.py + TestPartitionSubCompsolidWithCompSolid3.py + TestPartitionSubCompsolidWithSolid1.py + TestPartitionSubCompsolidWithSolid2.py + TestPartitionSubCompsolidWithSolid3.py + TestPartitionSubCompsolidWithSolid4.py + TestPartitionSubCompsolidWithSolid5.py + TestPartitionSubCompsolidWithFace1.py + TestPartitionSubCompsolidWithFace2.py + TestPartitionSubCompsolidWithFace3.py + TestPartitionSubCompsolidWithFace4.py + TestPartitionSubCompsolidWithFace5.py + TestPartitionSubCompsolidWithPlane1.py + TestPartitionSubCompsolidWithPlane2.py + TestPartitionSubCompsolidWithPlane3.py + TestPartitionSubCompsolidWithPlane4.py + TestPartitionSubCompsolidWithPlane5.py + TestPartitionArgsUpdate.py + TestPartition_SolidsHistory.py + TestBooleanFuse_Vertex_Vertex.py + TestBooleanFuse_VertexCompound_VertexCompound.py + TestBooleanFuse_Edge_Edge.py + TestBooleanFuse_EdgeCompound_EdgeCompound.py + TestBooleanFuse_Wire_Wire.py + TestBooleanFuse_WireCompound_WireCompound.py + TestBooleanFuse_Face_Face.py + TestBooleanFuse_FaceCompound_FaceCompound.py + TestBooleanFuse_Shell_Shell.py + TestBooleanFuse_ShellCompound_ShellCompound.py + TestBooleanFuse_Solid_Solid.py + TestBooleanFuse_SolidCompound_SolidCompound.py + TestBooleanFuse_CompSolid_Face.py + TestBooleanFuse_CompSolid_CompSolid.py + TestBooleanFuse_CompSolidCompound_CompSolidCompound.py + TestBooleanFuse_SolidsHistory.py + TestFillet.py + TestFillet1.py + TestFillet_ErrorMsg.py + TestFillet_History.py + TestScale1.py + TestScale2.py + Test1816.py + Test1876.py + Test2225.py + Test2631.py + Test2636.py + Test2650.py + Test2681.py + Test2686.py + Test2689.py + Test2693.py + Test2698.py + Test2701.py + Test2724.py + Test2692.py + Test2617.py + Test2729.py + Test2738.py + Test2751.py + Test2826.py + Test2854.py + Test2878.py + Test2920.py + Test2971.py + Test3014.py + TestBooleanCommon_MultiLevelCompound_v0_1.py + TestBooleanCommon_MultiLevelCompound_v0_2.py + TestBooleanCommon_MultiLevelCompound_v20190506_1.py + TestBooleanCommon_MultiLevelCompound_v20190506_2.py + TestBooleanCut_MultiLevelCompound_v0_1.py + TestBooleanCut_MultiLevelCompound_v0_2.py + TestBooleanCut_MultiLevelCompound_v20190506_1.py + TestBooleanCut_MultiLevelCompound_v20190506_2.py + TestBooleanFuse_MultiLevelCompound_v0_1.py + TestBooleanFuse_MultiLevelCompound_v0_2.py + TestBooleanFuse_MultiLevelCompound_v0_3.py + TestBooleanFuse_MultiLevelCompound_v0_4.py + TestBooleanFuse_MultiLevelCompound_v20190506_1.py + TestBooleanFuse_MultiLevelCompound_v20190506_2.py + TestBooleanFuse_MultiLevelCompound_v20190506_3.py + TestBooleanFuse_MultiLevelCompound_v20190506_4.py + TestBooleanSmash_MultiLevelCompound_v0_1.py + TestBooleanSmash_MultiLevelCompound_v0_2.py + TestBooleanSmash_MultiLevelCompound_v20190506_1.py + TestBooleanSmash_MultiLevelCompound_v20190506_2.py + TestBooleanSplit_MultiLevelCompound_v0_1.py + TestBooleanSplit_MultiLevelCompound_v0_2.py + TestBooleanSplit_MultiLevelCompound_v20190506_1.py + TestBooleanSplit_MultiLevelCompound_v20190506_2.py + TestPartition_MultiLevelCompound_v0_1.py + TestPartition_MultiLevelCompound_v0_2.py + TestPartition_MultiLevelCompound_v0_3.py + TestPartition_MultiLevelCompound_v20190506_1.py + TestPartition_MultiLevelCompound_v20190506_2.py + TestPartition_MultiLevelCompound_v20190506_3.py + TestUnion_MultiLevelCompound_v0.py + TestUnion_MultiLevelCompound_v20190506.py + TestUnionFaces_v20190506.py + TestRemoveResultsBody.py + TestRemoveResultsConstruction.py + TestRemoveResultsPart.py + Test17000.py + Test17261.py + Test17281.py + TestChamfer.py + Test3033.py + Test3076.py + Test17909.py + TestCopy_ErrorMsg.py + TestCopyFeature.py + TestCopyFeatureMoveGroupOfFeature.py + TestCopyMoveResult.py + TestCopyMoveSubShapes.py + TestCopyNames.py + TestCopySubShapes.py + TestCopyWholeFeature.py + TestImportResult.py + TestDefeaturing_ErrorMsg.py + TestDefeaturing_OnSolid1.py + TestDefeaturing_OnSolid2.py + TestDefeaturing_OnSolid3.py + TestDefeaturing_OnCompsolid1.py + TestDefeaturing_OnCompsolid2.py + TestDefeaturing_OnCompsolid3.py + TestDefeaturing_OnCompound.py + Test3137_1.py + Test3137_2.py + Test2918.py + Test3139.py + TestPlacement_MultiLevelCompound_v0_1.py + TestPlacement_MultiLevelCompound_v0_2.py + TestPlacement_MultiLevelCompound_v0_3.py + TestPlacement_MultiLevelCompound_v0_4.py + TestPlacement_MultiLevelCompound_v0_5.py + TestPlacement_MultiLevelCompound_v0_6.py + TestPlacement_MultiLevelCompound_v95_1.py + TestPlacement_MultiLevelCompound_v95_2.py + TestPlacement_MultiLevelCompound_v95_3.py + TestPlacement_MultiLevelCompound_v95_4.py + TestPlacement_MultiLevelCompound_v95_5.py + TestPlacement_MultiLevelCompound_v95_6.py + TestTranslation_MultiLevelCompound_v0_1.py + TestTranslation_MultiLevelCompound_v0_2.py + TestTranslation_MultiLevelCompound_v0_3.py + TestTranslation_MultiLevelCompound_v0_4.py + TestTranslation_MultiLevelCompound_v0_5.py + TestTranslation_MultiLevelCompound_v95_1.py + TestTranslation_MultiLevelCompound_v95_2.py + TestTranslation_MultiLevelCompound_v95_3.py + TestTranslation_MultiLevelCompound_v95_4.py + TestTranslation_MultiLevelCompound_v95_5.py + TestRotation_MultiLevelCompound_v0_1.py + TestRotation_MultiLevelCompound_v0_2.py + TestRotation_MultiLevelCompound_v0_3.py + TestRotation_MultiLevelCompound_v0_4.py + TestRotation_MultiLevelCompound_v95_1.py + TestRotation_MultiLevelCompound_v95_2.py + TestRotation_MultiLevelCompound_v95_3.py + TestRotation_MultiLevelCompound_v95_4.py + TestSymmetry_MultiLevelCompound_v0_1.py + TestSymmetry_MultiLevelCompound_v0_2.py + TestSymmetry_MultiLevelCompound_v0_3.py + TestSymmetry_MultiLevelCompound_v0_4.py + TestSymmetry_MultiLevelCompound_v0_5.py + TestSymmetry_MultiLevelCompound_v95_1.py + TestSymmetry_MultiLevelCompound_v95_2.py + TestSymmetry_MultiLevelCompound_v95_3.py + TestSymmetry_MultiLevelCompound_v95_4.py + TestSymmetry_MultiLevelCompound_v95_5.py + TestScale_MultiLevelCompound_v0_1.py + TestScale_MultiLevelCompound_v0_2.py + TestScale_MultiLevelCompound_v0_3.py + TestScale_MultiLevelCompound_v0_4.py + TestScale_MultiLevelCompound_v95_1.py + TestScale_MultiLevelCompound_v95_2.py + TestScale_MultiLevelCompound_v95_3.py + TestScale_MultiLevelCompound_v95_4.py + TestMultiTranslation_MultiLevelCompound_v0_1.py + TestMultiTranslation_MultiLevelCompound_v0_2.py + TestMultiTranslation_MultiLevelCompound_v0_3.py + TestMultiTranslation_MultiLevelCompound_v0_4.py + TestMultiTranslation_MultiLevelCompound_v95_1.py + TestMultiTranslation_MultiLevelCompound_v95_2.py + TestMultiTranslation_MultiLevelCompound_v95_3.py + TestMultiTranslation_MultiLevelCompound_v95_4.py + TestMultiRotation_MultiLevelCompound_v0_1.py + TestMultiRotation_MultiLevelCompound_v0_2.py + TestMultiRotation_MultiLevelCompound_v0_3.py + TestMultiRotation_MultiLevelCompound_v0_4.py + TestMultiRotation_MultiLevelCompound_v95_1.py + TestMultiRotation_MultiLevelCompound_v95_2.py + TestMultiRotation_MultiLevelCompound_v95_3.py + TestMultiRotation_MultiLevelCompound_v95_4.py + TestIntersection_MultiLevelCompound_v0_1.py + TestIntersection_MultiLevelCompound_v0_2.py + TestIntersection_MultiLevelCompound_v95_1.py + TestIntersection_MultiLevelCompound_v95_2.py + TestFillet_MultiLevelCompound_v0_1.py + TestFillet_MultiLevelCompound_v0_2.py + TestFillet_MultiLevelCompound_v0_3.py + TestFillet_MultiLevelCompound_v0_4.py + TestFillet_MultiLevelCompound_v95_1.py + TestFillet_MultiLevelCompound_v95_2.py + TestFillet_MultiLevelCompound_v95_3.py + TestFillet_MultiLevelCompound_v95_4.py + TestChamfer_MultiLevelCompound_v0_1.py + TestChamfer_MultiLevelCompound_v0_2.py + TestChamfer_MultiLevelCompound_v0_3.py + TestChamfer_MultiLevelCompound_v0_4.py + TestChamfer_MultiLevelCompound_v95_1.py + TestChamfer_MultiLevelCompound_v95_2.py + TestChamfer_MultiLevelCompound_v95_3.py + TestChamfer_MultiLevelCompound_v95_4.py + Test18836.py + Test2817.py + Test19065.py + Test19066.py + Test19115.py + Test19196.py + TestFillet1D_ErrorMsg.py + TestFillet1D_Vertices_1.py + TestFillet1D_Vertices_2.py + TestFillet1D_Vertices_3.py + TestFillet1D_Vertices_4.py + TestFillet1D_Vertices_5.py + TestFillet1D_Vertices_6.py + TestFillet1D_Vertices_7.py + TestFillet1D_Vertices_8.py + TestFillet1D_Vertices_9.py + TestFillet1D_Wire_1.py + TestFillet1D_Wire_2.py + TestFillet1D_Wire_3.py + TestFillet1D_Wire_4.py + TestFillet1D_Wire_5.py + Test19931.py + Test20027.py + Test20245_1.py + Test20245_2.py + Test20245_3.py + Test20247.py + Test22847.py + TestPointCoordinates.py + TestGeometryCalculation.py + TestBoundingBox.py + Test23885.py +) diff --git a/src/FiltersPlugin/CMakeLists.txt b/src/FiltersPlugin/CMakeLists.txt index 1c9bca592..7a847641f 100644 --- a/src/FiltersPlugin/CMakeLists.txt +++ b/src/FiltersPlugin/CMakeLists.txt @@ -107,106 +107,24 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS}) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FiltersPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) -ADD_UNIT_TESTS( - TestFilters.py - TestFilters_Mixed1.py - TestFilters_Mixed2.py - TestFilters_Supported.py - TestFilters_Validator.py - TestFilters_Xml.py - TestFilters_FilterName.py - TestFilters_IsReversed.py - TestFilters_Remove.py - TestFilter_BelongsTo.py - TestFilter_BelongsTo_Exclude.py - TestFilter_OnPlane.py - TestFilter_OnPlane_Exclude.py - TestFilter_OnPlane_Multi.py - TestFilter_OnLine.py - TestFilter_OnLine_Exclude.py - TestFilter_OnLine_Multi.py - TestFilter_OnGeometry_Edge1.py - TestFilter_OnGeometry_Edge2.py - TestFilter_OnGeometry_Face1.py - TestFilter_OnGeometry_Face2.py - TestFilter_OnGeometry_Face3.py - TestFilter_OnGeometry_Face4.py - TestFilter_OnGeometry_Exclude_Edge1.py - TestFilter_OnGeometry_Exclude_Edge2.py - TestFilter_OnGeometry_Exclude_Face1.py - TestFilter_OnGeometry_Exclude_Face2.py - TestFilter_OnGeometry_Exclude_Face3.py - TestFilter_OnGeometry_Exclude_Face4.py - TestFilter_OnPlaneSide_Face.py - TestFilter_OnPlaneSide_Plane.py - TestFilter_OnPlaneSide_Exclude_Face.py - TestFilter_OnPlaneSide_Exclude_Plane.py - TestFilter_OnPlaneSide_Multi.py - TestFilter_OppositeToEdge.py - TestFilter_OppositeToEdge_Exclude.py - TestFilter_RelativeToSolid_In.py - TestFilter_RelativeToSolid_Out.py - TestFilter_RelativeToSolid_On.py - TestFilter_RelativeToSolid_NotOn.py - TestFilter_RelativeToSolid_InAndOn.py - TestFilter_RelativeToSolid_OutAndOn.py - TestFilter_RelativeToSolid_Exclude_In.py - TestFilter_RelativeToSolid_Exclude_Out.py - TestFilter_RelativeToSolid_Exclude_On.py - TestFilter_RelativeToSolid_Exclude_NotOn.py - TestFilter_RelativeToSolid_Exclude_InAndOn.py - TestFilter_RelativeToSolid_Exclude_OutAndOn.py - TestFilter_RelativeToSolid_Multi.py - TestFilter_ExternalFaces1.py - TestFilter_ExternalFaces2.py - TestFilter_ExternalFaces_Exclude1.py - TestFilter_ExternalFaces_Exclude2.py - TestFilter_HorizontalFaces.py - TestFilter_HorizontalFaces_Exclude.py - TestFilter_VerticalFaces.py - TestFilter_VerticalFaces_Exclude.py - TestFilter_TopoConnectedFaces_Vertex1.py - TestFilter_TopoConnectedFaces_Vertex2.py - TestFilter_TopoConnectedFaces_Vertex3.py - TestFilter_TopoConnectedFaces_Prop_Vertex1.py - TestFilter_TopoConnectedFaces_Prop_Vertex2.py - TestFilter_TopoConnectedFaces_Prop_Vertex3.py - TestFilter_TopoConnectedFaces_Edge1.py - TestFilter_TopoConnectedFaces_Edge2.py - TestFilter_TopoConnectedFaces_Edge3.py - TestFilter_TopoConnectedFaces_Prop_Edge1.py - TestFilter_TopoConnectedFaces_Prop_Edge2.py - TestFilter_TopoConnectedFaces_Prop_Edge3.py - TestFilter_TopoConnectedFaces_Face1.py - TestFilter_TopoConnectedFaces_Face2.py - TestFilter_TopoConnectedFaces_Face3.py - TestFilter_TopoConnectedFaces_Prop_Face1.py - TestFilter_TopoConnectedFaces_Prop_Face2.py - TestFilter_TopoConnectedFaces_Prop_Face3.py - TestFilter_TopoConnectedFaces_Exclude_Vertex1.py - TestFilter_TopoConnectedFaces_Exclude_Vertex2.py - TestFilter_TopoConnectedFaces_Exclude_Vertex3.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py - TestFilter_TopoConnectedFaces_Exclude_Edge1.py - TestFilter_TopoConnectedFaces_Exclude_Edge2.py - TestFilter_TopoConnectedFaces_Exclude_Edge3.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py - TestFilter_TopoConnectedFaces_Exclude_Face1.py - TestFilter_TopoConnectedFaces_Exclude_Face2.py - TestFilter_TopoConnectedFaces_Exclude_Face3.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py - TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py - TestFilter_TopoConnectedFaces_Multi.py - Test2946.py - Test2951.py - Test3241.py - Test17924.py - Test17962.py - Test19190.py -) diff --git a/src/FiltersPlugin/CTestTestfileInstall.cmake b/src/FiltersPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/FiltersPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/FiltersPlugin/tests.set b/src/FiltersPlugin/tests.set new file mode 100644 index 000000000..722601d08 --- /dev/null +++ b/src/FiltersPlugin/tests.set @@ -0,0 +1,121 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestFilters.py + TestFilters_Mixed1.py + TestFilters_Mixed2.py + TestFilters_Supported.py + TestFilters_Validator.py + TestFilters_Xml.py + TestFilters_FilterName.py + TestFilters_IsReversed.py + TestFilters_Remove.py + TestFilter_BelongsTo.py + TestFilter_BelongsTo_Exclude.py + TestFilter_OnPlane.py + TestFilter_OnPlane_Exclude.py + TestFilter_OnPlane_Multi.py + TestFilter_OnLine.py + TestFilter_OnLine_Exclude.py + TestFilter_OnLine_Multi.py + TestFilter_OnGeometry_Edge1.py + TestFilter_OnGeometry_Edge2.py + TestFilter_OnGeometry_Face1.py + TestFilter_OnGeometry_Face2.py + TestFilter_OnGeometry_Face3.py + TestFilter_OnGeometry_Face4.py + TestFilter_OnGeometry_Exclude_Edge1.py + TestFilter_OnGeometry_Exclude_Edge2.py + TestFilter_OnGeometry_Exclude_Face1.py + TestFilter_OnGeometry_Exclude_Face2.py + TestFilter_OnGeometry_Exclude_Face3.py + TestFilter_OnGeometry_Exclude_Face4.py + TestFilter_OnPlaneSide_Face.py + TestFilter_OnPlaneSide_Plane.py + TestFilter_OnPlaneSide_Exclude_Face.py + TestFilter_OnPlaneSide_Exclude_Plane.py + TestFilter_OnPlaneSide_Multi.py + TestFilter_OppositeToEdge.py + TestFilter_OppositeToEdge_Exclude.py + TestFilter_RelativeToSolid_In.py + TestFilter_RelativeToSolid_Out.py + TestFilter_RelativeToSolid_On.py + TestFilter_RelativeToSolid_NotOn.py + TestFilter_RelativeToSolid_InAndOn.py + TestFilter_RelativeToSolid_OutAndOn.py + TestFilter_RelativeToSolid_Exclude_In.py + TestFilter_RelativeToSolid_Exclude_Out.py + TestFilter_RelativeToSolid_Exclude_On.py + TestFilter_RelativeToSolid_Exclude_NotOn.py + TestFilter_RelativeToSolid_Exclude_InAndOn.py + TestFilter_RelativeToSolid_Exclude_OutAndOn.py + TestFilter_RelativeToSolid_Multi.py + TestFilter_ExternalFaces1.py + TestFilter_ExternalFaces2.py + TestFilter_ExternalFaces_Exclude1.py + TestFilter_ExternalFaces_Exclude2.py + TestFilter_HorizontalFaces.py + TestFilter_HorizontalFaces_Exclude.py + TestFilter_VerticalFaces.py + TestFilter_VerticalFaces_Exclude.py + TestFilter_TopoConnectedFaces_Vertex1.py + TestFilter_TopoConnectedFaces_Vertex2.py + TestFilter_TopoConnectedFaces_Vertex3.py + TestFilter_TopoConnectedFaces_Prop_Vertex1.py + TestFilter_TopoConnectedFaces_Prop_Vertex2.py + TestFilter_TopoConnectedFaces_Prop_Vertex3.py + TestFilter_TopoConnectedFaces_Edge1.py + TestFilter_TopoConnectedFaces_Edge2.py + TestFilter_TopoConnectedFaces_Edge3.py + TestFilter_TopoConnectedFaces_Prop_Edge1.py + TestFilter_TopoConnectedFaces_Prop_Edge2.py + TestFilter_TopoConnectedFaces_Prop_Edge3.py + TestFilter_TopoConnectedFaces_Face1.py + TestFilter_TopoConnectedFaces_Face2.py + TestFilter_TopoConnectedFaces_Face3.py + TestFilter_TopoConnectedFaces_Prop_Face1.py + TestFilter_TopoConnectedFaces_Prop_Face2.py + TestFilter_TopoConnectedFaces_Prop_Face3.py + TestFilter_TopoConnectedFaces_Exclude_Vertex1.py + TestFilter_TopoConnectedFaces_Exclude_Vertex2.py + TestFilter_TopoConnectedFaces_Exclude_Vertex3.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py + TestFilter_TopoConnectedFaces_Exclude_Edge1.py + TestFilter_TopoConnectedFaces_Exclude_Edge2.py + TestFilter_TopoConnectedFaces_Exclude_Edge3.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py + TestFilter_TopoConnectedFaces_Exclude_Face1.py + TestFilter_TopoConnectedFaces_Exclude_Face2.py + TestFilter_TopoConnectedFaces_Exclude_Face3.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py + TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py + TestFilter_TopoConnectedFaces_Multi.py + Test2946.py + Test2951.py + Test3241.py + Test17924.py + Test17962.py + Test19190.py +) diff --git a/src/GeomAPI/CMakeLists.txt b/src/GeomAPI/CMakeLists.txt index f335fa5a6..396545e8f 100644 --- a/src/GeomAPI/CMakeLists.txt +++ b/src/GeomAPI/CMakeLists.txt @@ -166,18 +166,23 @@ INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) -ADD_UNIT_TESTS( - TestAx123.py - TestBox.py - TestBuilders.py - TestCone.py - TestCylinder.py - TestEllipse2d.py - TestLine.py - TestPlanarEdge.py - TestPolygon.py - TestSphere.py - TestTorus.py - Test2675.py - Test2879.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/GeomAPI/CTestTestfileInstall.cmake b/src/GeomAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/GeomAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/GeomAPI/tests.set b/src/GeomAPI/tests.set new file mode 100644 index 000000000..524275130 --- /dev/null +++ b/src/GeomAPI/tests.set @@ -0,0 +1,34 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestAx123.py + TestBox.py + TestBuilders.py + TestCone.py + TestCylinder.py + TestEllipse2d.py + TestLine.py + TestPlanarEdge.py + TestPolygon.py + TestSphere.py + TestTorus.py + Test2675.py + Test2879.py +) diff --git a/src/GeomDataAPI/CMakeLists.txt b/src/GeomDataAPI/CMakeLists.txt index 24c265106..12573faeb 100644 --- a/src/GeomDataAPI/CMakeLists.txt +++ b/src/GeomDataAPI/CMakeLists.txt @@ -81,4 +81,23 @@ INSTALL(TARGETS GeomDataAPI DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) -ADD_UNIT_TESTS(TestConstants.py) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomDataAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/GeomDataAPI/CTestTestfileInstall.cmake b/src/GeomDataAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/GeomDataAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/GeomDataAPI/tests.set b/src/GeomDataAPI/tests.set new file mode 100644 index 000000000..ed20e3214 --- /dev/null +++ b/src/GeomDataAPI/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestConstants.py +) diff --git a/src/Locale/CMakeLists.txt b/src/Locale/CMakeLists.txt index ec83f609b..439902f10 100644 --- a/src/Locale/CMakeLists.txt +++ b/src/Locale/CMakeLists.txt @@ -43,6 +43,23 @@ TARGET_LINK_LIBRARIES(Locale ${PROJECT_LIBRARIES}) INSTALL(TARGETS Locale DESTINATION ${SHAPER_INSTALL_BIN}) -ADD_UNIT_TESTS( - TestUTF8.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Locale") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/Locale/CTestTestfileInstall.cmake b/src/Locale/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/Locale/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/Locale/tests.set b/src/Locale/tests.set new file mode 100644 index 000000000..9395e5401 --- /dev/null +++ b/src/Locale/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestUTF8.py +) diff --git a/src/ModelAPI/CMakeLists.txt b/src/ModelAPI/CMakeLists.txt index 68b34a177..c9a082e00 100644 --- a/src/ModelAPI/CMakeLists.txt +++ b/src/ModelAPI/CMakeLists.txt @@ -165,107 +165,23 @@ INSTALL(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) -ADD_UNIT_TESTS(TestConstants.py - TestUndoRedo.py - TestDocument.py - Test1064.py - TestResults.py - TestIntArray.py - Test1512.py - Test1562.py - TestDoubleArray.py - Test1757.py - Test1998.py - Test1995.py - Test2170.py - TestExternalConstruction.py - Test2228.py - Test2241.py - Test2252.py - Test2276.py - Test2389.py - Test2391.py - TestCustomName_BooleanCut.py - TestCustomName_CommonCompSolid.py - TestCustomName_CutCompSolid.py - TestCustomName_CutGroup.py - TestCustomName_DefaultName.py - TestCustomName_ExtrudeFace.py - TestCustomName_ExtrusionCut.py - TestCustomName_ExtrusionCutFace.py - TestCustomName_MultiTranslation.py - TestCustomName_Partition.py - TestCustomName_Placement.py - TestCustomName_Recover.py - TestCustomName_Rename.py - TestCustomName_RotateGroup.py - TestCustomName_Translation.py - TestFolder_Create.py - TestFolder_Update.py - TestFolder_Remove.py - TestFolder_Stability.py - TestFolder_CustomName.py - TestFolder_Empty.py - TestFolder_Sketch.py - Test2358_1.py - Test2358_2.py - Test2396.py - Test2401.py - Test2413.py - Test2496.py - Test2510.py - TestFeatureSelection_1.py - TestFeatureSelection_2.py - Test2607.py - TestBlockRecalculation.py - TestSelectionScope.py - TestSelectorShell.py - TestWeakNaming2125.py - TestWeakNaming2222.py - TestWeakNaming2245.py - TestWeakNaming2247.py - TestWeakNaming2248.py - TestWeakNaming2261.py - TestWeakNaming2291.py - TestWeakNaming2335.py - TestWeakNaming2375.py - TestWeakNaming2437.py - TestWeakNaming2445.py - TestWeakNaming2446.py - TestWeakNaming2452.py - TestWeakNamingSortOrder.py - Test2685.py - TestGeomNamingPlacement.py - TestGeomNamingRevolution.py - TestGeomNamingEdgeByFilter.py - TestGeomNamingSketchPlane.py - TestGeomNamingBoxWithFillet.py - TestContainerSelector.py - TestSaveOpen1.py - TestSaveOpen2.py - TestSelectionInitialization.py - TestSelectionCircleCenter.py - TestSelectionInPart.py - Test2828.py - TestSelectionRestore.py - Test2491.py - Test2493.py - Test2627.py - Test2859.py - Test2873.py - Test2901.py - Test2903.py - Test3020.py - Test3116.py - Test19019_1.py - Test19019_2.py - Test19031.py - Test19058.py - Test19217.py - Test19707.py - Test19726.py - Test19912.py - Test19932.py - Test19989.py - Test20170.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ModelAPI/CTestTestfileInstall.cmake b/src/ModelAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ModelAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ModelAPI/tests.set b/src/ModelAPI/tests.set new file mode 100644 index 000000000..afebf68a2 --- /dev/null +++ b/src/ModelAPI/tests.set @@ -0,0 +1,124 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestConstants.py + TestUndoRedo.py + TestDocument.py + Test1064.py + TestResults.py + TestIntArray.py + Test1512.py + Test1562.py + TestDoubleArray.py + Test1757.py + Test1998.py + Test1995.py + Test2170.py + TestExternalConstruction.py + Test2228.py + Test2241.py + Test2252.py + Test2276.py + Test2389.py + Test2391.py + TestCustomName_BooleanCut.py + TestCustomName_CommonCompSolid.py + TestCustomName_CutCompSolid.py + TestCustomName_CutGroup.py + TestCustomName_DefaultName.py + TestCustomName_ExtrudeFace.py + TestCustomName_ExtrusionCut.py + TestCustomName_ExtrusionCutFace.py + TestCustomName_MultiTranslation.py + TestCustomName_Partition.py + TestCustomName_Placement.py + TestCustomName_Recover.py + TestCustomName_Rename.py + TestCustomName_RotateGroup.py + TestCustomName_Translation.py + TestFolder_Create.py + TestFolder_Update.py + TestFolder_Remove.py + TestFolder_Stability.py + TestFolder_CustomName.py + TestFolder_Empty.py + TestFolder_Sketch.py + Test2358_1.py + Test2358_2.py + Test2396.py + Test2401.py + Test2413.py + Test2496.py + Test2510.py + TestFeatureSelection_1.py + TestFeatureSelection_2.py + Test2607.py + TestBlockRecalculation.py + TestSelectionScope.py + TestSelectorShell.py + TestWeakNaming2125.py + TestWeakNaming2222.py + TestWeakNaming2245.py + TestWeakNaming2247.py + TestWeakNaming2248.py + TestWeakNaming2261.py + TestWeakNaming2291.py + TestWeakNaming2335.py + TestWeakNaming2375.py + TestWeakNaming2437.py + TestWeakNaming2445.py + TestWeakNaming2446.py + TestWeakNaming2452.py + TestWeakNamingSortOrder.py + Test2685.py + TestGeomNamingPlacement.py + TestGeomNamingRevolution.py + TestGeomNamingEdgeByFilter.py + TestGeomNamingSketchPlane.py + TestGeomNamingBoxWithFillet.py + TestContainerSelector.py + TestSaveOpen1.py + TestSaveOpen2.py + TestSelectionInitialization.py + TestSelectionCircleCenter.py + TestSelectionInPart.py + Test2828.py + TestSelectionRestore.py + Test2491.py + Test2493.py + Test2627.py + Test2859.py + Test2873.py + Test2901.py + Test2903.py + Test3020.py + Test3116.py + Test19019_1.py + Test19019_2.py + Test19031.py + Test19058.py + Test19217.py + Test19707.py + Test19726.py + Test19912.py + Test19932.py + Test19989.py + Test20170.py +) diff --git a/src/ModelGeomAlgo/CMakeLists.txt b/src/ModelGeomAlgo/CMakeLists.txt index 104e56903..915a4e6ed 100644 --- a/src/ModelGeomAlgo/CMakeLists.txt +++ b/src/ModelGeomAlgo/CMakeLists.txt @@ -88,4 +88,23 @@ INSTALL(TARGETS _ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(TARGETS ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) -ADD_UNIT_TESTS(TestPoint2D.py) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelGeomAlgo") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ModelGeomAlgo/CTestTestfileInstall.cmake b/src/ModelGeomAlgo/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ModelGeomAlgo/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ModelGeomAlgo/tests.set b/src/ModelGeomAlgo/tests.set new file mode 100644 index 000000000..f28b3d296 --- /dev/null +++ b/src/ModelGeomAlgo/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestPoint2D.py +) diff --git a/src/ModelHighAPI/CMakeLists.txt b/src/ModelHighAPI/CMakeLists.txt index e52c3807d..268b3cdf5 100644 --- a/src/ModelHighAPI/CMakeLists.txt +++ b/src/ModelHighAPI/CMakeLists.txt @@ -116,17 +116,23 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py DESTINATION ${SHAPER_I INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestDouble.py - TestInteger.py - TestRefAttr.py - TestReference.py - TestDeflectionDump.py - TestUndoRedo.py - Test2488.py - Test18451.py - Test19031.py - Test19990_1.py - Test19990_2.py - Test20167.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelHighAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ModelHighAPI/CTestTestfileInstall.cmake b/src/ModelHighAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ModelHighAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ModelHighAPI/tests.set b/src/ModelHighAPI/tests.set new file mode 100644 index 000000000..626f23807 --- /dev/null +++ b/src/ModelHighAPI/tests.set @@ -0,0 +1,33 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestDouble.py + TestInteger.py + TestRefAttr.py + TestReference.py + TestDeflectionDump.py + TestUndoRedo.py + Test2488.py + Test18451.py + Test19031.py + Test19990_1.py + Test19990_2.py + Test20167.py +) diff --git a/src/ParametersPlugin/CMakeLists.txt b/src/ParametersPlugin/CMakeLists.txt index 89b45c450..9776dc299 100644 --- a/src/ParametersPlugin/CMakeLists.txt +++ b/src/ParametersPlugin/CMakeLists.txt @@ -118,14 +118,23 @@ INSTALL(TARGETS ParametersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES}) -ADD_UNIT_TESTS(TestParameterCreation.py - TestParameterRename.py - TestParameterChangeValue.py - TestParameterDelete.py - TestParameterErrorMsg.py - TestParametersMgr.py - Test1806.py - Test2392.py - Test2474.py - Test19036.py - ) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ParametersPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/ParametersPlugin/CTestTestfileInstall.cmake b/src/ParametersPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/ParametersPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/ParametersPlugin/tests.set b/src/ParametersPlugin/tests.set new file mode 100644 index 000000000..48514ff6b --- /dev/null +++ b/src/ParametersPlugin/tests.set @@ -0,0 +1,31 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestParameterCreation.py + TestParameterRename.py + TestParameterChangeValue.py + TestParameterDelete.py + TestParameterErrorMsg.py + TestParametersMgr.py + Test1806.py + Test2392.py + Test2474.py + Test19036.py +) diff --git a/src/PartSetAPI/CMakeLists.txt b/src/PartSetAPI/CMakeLists.txt index 92b5b6bd9..ab5ed3087 100644 --- a/src/PartSetAPI/CMakeLists.txt +++ b/src/PartSetAPI/CMakeLists.txt @@ -91,5 +91,23 @@ ENDIF(WIN32) INSTALL(TARGETS _PartSetAPI DESTINATION ${SHAPER_INSTALL_SWIG}) INSTALL(TARGETS PartSetAPI DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/PartSetAPI.py DESTINATION ${SHAPER_INSTALL_SWIG}) - -ADD_UNIT_TESTS(TestRemoveDuplicate.py) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PartSetAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/PartSetAPI/CTestTestfileInstall.cmake b/src/PartSetAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/PartSetAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/PartSetAPI/tests.set b/src/PartSetAPI/tests.set new file mode 100644 index 000000000..ff717debf --- /dev/null +++ b/src/PartSetAPI/tests.set @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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(TEST_NAMES +TestRemoveDuplicate.py +) diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index b1c14f67c..2e97d3a89 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -25,37 +25,23 @@ INSTALL(FILES initConfig.py DESTINATION ${SHAPER_INSTALL_PYTHON_API}) # --------- Unit tests ----------- INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestPythonAPI.py - TestModel.py - - TestSketcherAddPoint.py - TestSketcherAddLine.py - TestSketcherAddArc.py - TestSketcherAddCircle.py - TestSketcherAddMirror.py - TestSketcherSetCoincident.py - TestSketcherSetTangent.py - TestSketcherSetParallel.py - TestSketcherSetPerpendicular.py - TestSketcherSetHorizontal.py - TestSketcherSetVertical.py - TestSketcherSetFixed.py - TestSketcherSetLength.py - TestSketcherSetRadius.py - TestSketcherSetAngle.py - TestSketcherSetEqual.py - TestSketcherSetFillet.py - - TestFeatures.py - TestFeaturesExtrusion.py - TestFeaturesRevolution.py - - TestPrimitivesBox.py - - TestMakeBrick1.py - TestMakeBrick2.py - TestPlatine.py - - Test2044.py - ) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/PythonAPI/CTestTestfileInstall.cmake b/src/PythonAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/PythonAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/PythonAPI/tests.set b/src/PythonAPI/tests.set new file mode 100644 index 000000000..2781db704 --- /dev/null +++ b/src/PythonAPI/tests.set @@ -0,0 +1,53 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestPythonAPI.py + TestModel.py + + TestSketcherAddPoint.py + TestSketcherAddLine.py + TestSketcherAddArc.py + TestSketcherAddCircle.py + TestSketcherAddMirror.py + TestSketcherSetCoincident.py + TestSketcherSetTangent.py + TestSketcherSetParallel.py + TestSketcherSetPerpendicular.py + TestSketcherSetHorizontal.py + TestSketcherSetVertical.py + TestSketcherSetFixed.py + TestSketcherSetLength.py + TestSketcherSetRadius.py + TestSketcherSetAngle.py + TestSketcherSetEqual.py + TestSketcherSetFillet.py + + TestFeatures.py + TestFeaturesExtrusion.py + TestFeaturesRevolution.py + + TestPrimitivesBox.py + + TestMakeBrick1.py + TestMakeBrick2.py + TestPlatine.py + + Test2044.py +) diff --git a/src/PythonAddons/CMakeLists.txt b/src/PythonAddons/CMakeLists.txt index 9f40500b2..c94267d9c 100644 --- a/src/PythonAddons/CMakeLists.txt +++ b/src/PythonAddons/CMakeLists.txt @@ -45,8 +45,23 @@ INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestRectangle.py - TestcompoundVertices.py - TestimportParameters.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAddons") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/PythonAddons/CTestTestfileInstall.cmake b/src/PythonAddons/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/PythonAddons/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/PythonAddons/tests.set b/src/PythonAddons/tests.set new file mode 100644 index 000000000..ecda87d26 --- /dev/null +++ b/src/PythonAddons/tests.set @@ -0,0 +1,24 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestRectangle.py + TestcompoundVertices.py + TestimportParameters.py +) diff --git a/src/SketchAPI/CMakeLists.txt b/src/SketchAPI/CMakeLists.txt index a1ea1da27..8bc3bc358 100644 --- a/src/SketchAPI/CMakeLists.txt +++ b/src/SketchAPI/CMakeLists.txt @@ -143,9 +143,23 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/SketchAPI.py DESTINATION ${SHAPER_INST INCLUDE(UnitTest) -ADD_UNIT_TESTS( - TestSketch.py - TestFreePoints.py -) - -# ADD_SUBDIRECTORY (Test) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchAPI") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/SketchAPI/CTestTestfileInstall.cmake b/src/SketchAPI/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ceaee95f9 --- /dev/null +++ b/src/SketchAPI/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/SketchAPI/tests.set b/src/SketchAPI/tests.set new file mode 100644 index 000000000..ed1414d3d --- /dev/null +++ b/src/SketchAPI/tests.set @@ -0,0 +1,23 @@ +# Copyright (C) 2021 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(TEST_NAMES + TestSketch.py + TestFreePoints.py +) diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index 938382105..fe67671b3 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -183,236 +183,38 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS( - Test1061.py - Test1577.py - Test1578.py - Test1673.py - Test1779.py - Test1924.py - Test1963.py - Test1966.py - Test1967.py - Test2034_1.py - Test2034_2.py - Test2034_3.py - Test2062.py - Test2095.py - Test2115.py - Test2119.py - Test2134.py - Test2157.py - Test2157_2.py - Test2224.py - Test2229.py - Test2239.py - Test2273.py - Test2280.py - Test2287.py - Test2341.py - Test2376.py - Test2390.py - Test2393.py - Test2425.py - Test2427.py - Test2440.py - Test2481.py - Test2654.py - Test2711.py - Test2741.py - Test2810.py - Test2824.py - Test2860.py - Test2894.py - Test3019.py - Test3087_1.py - Test3087_2.py - Test3132.py - Test3154.py - Test3170.py - Test3240.py - Test19089.py - Test19101.py - Test20274_1.py - Test20274_2.py - Test20274_3.py - Test24015.py +include(tests.set) - TestArcBehavior.py - TestBSplineAddPole.py - TestCenteredRectangle.py - TestChangeSketchPlane1.py - TestChangeSketchPlane2.py - TestChangeSketchPlane3.py - TestChangeSketchPlane4.py - TestConstraintAngle.py - TestConstraintAngle_v0_1.py - TestConstraintAngle_v0_2.py - TestConstraintAngle_v20191210_1.py - TestConstraintAngle_v20191210_2.py - TestConstraintAngleBehaviorDirect.py - TestConstraintAngleBehaviorSupplementary_1.py - TestConstraintAngleBehaviorSupplementary_2.py - TestConstraintAngleBehaviorBackward_1.py - TestConstraintAngleBehaviorBackward_2.py - TestConstraintAngleEllipse.py - TestConstraintCoincidence.py - TestConstraintCoincidenceBSpline.py - TestConstraintCoincidenceEllipse.py - TestConstraintCoincidenceEllipticArc.py - TestConstraintCollinear.py - TestConstraintCollinearEllipse.py - TestConstraintDistance.py - TestConstraintDistanceEllipse.py - TestConstraintDistanceBehavior.py - TestConstraintDistanceHorizontal.py - TestConstraintDistanceVertical.py - TestConstraintDistanceZero.py - TestConstraintDistanceHorizontalZero.py - TestConstraintDistanceVerticalZero.py - TestConstraintEqual.py - TestConstraintEqualEllipse.py - TestConstraintFixed.py - TestConstraintHorizontal.py - TestConstraintHorizontalValidator.py - TestConstraintLength.py - TestConstraintMiddlePoint.py - TestConstraintMiddlePointOnArc.py - TestConstraintMiddlePointOnEllipticArc.py - TestConstraintParallel.py - TestConstraintPerpendicular.py - TestConstraintPerpendicularArcLine.py - TestConstraintPerpendicularEllipseLine.py - TestConstraintRadius.py - TestConstraintRadiusFailure.py - TestConstraintTangent.py - TestConstraintTangentBSpline.py - TestConstraintTangentEllipse.py - TestConstraintTangentEllipticArc.py - TestConstraintVertical.py - TestCreateArcByCenterStartEnd.py - TestCreateArcByTangentEdge.py - TestCreateArcByThreePoints.py - TestCreateArcByTransversalLine.py - TestCreateArcChangeType.py - TestCreateBSpline.py - TestCreateBSplinePeriodic.py - TestCreateCircleByCenterAndPassed.py - TestCreateCircleByThreePoints.py - TestCreateCircleChangeType.py - TestCreateEllipseByCenterSemiaxisAndPassed.py - TestCreateEllipseByMajorAxisAndPassed.py - TestCreateEllipseByExternal.py - TestCreateEllipticArc.py - TestCreateEllipticArcByExternal.py - TestCreateMacroBSpline.py - TestCurveFitting1.py - TestCurveFitting2.py - TestCurveFitting3.py - TestCurveFitting4.py - TestDegeneratedGeometry.py - TestDistanceDump.py - TestDistanceSignedVsUnsigned01.py - TestDistanceSignedVsUnsigned02.py - TestDistanceSignedVsUnsigned03.py - TestDistanceSignedVsUnsigned04.py - TestDistanceSignedVsUnsigned05.py - TestEdgesOrder.py - TestFillet.py - TestFilletAfterFolder.py - TestFilletInteracting.py - TestHighload.py - TestIntersectionChangeEdge.py - TestIntersectionWithCircle.py - TestIntersectionWithLine.py - TestIntersectionWithSpline.py - TestMirror.py - TestMultiRotation.py - TestMultiRotation01.py - TestMultiRotation02.py - TestMultiRotation03.py - TestMultiRotation04.py - TestMultiRotation05.py - TestMultiRotationWithParameter.py - TestMultiTranslation.py - TestOffset1.py - TestOffset2.py - TestPresentation.py - TestProjection.py - TestProjectionBSpline.py - TestProjectionBSplinePeriodic.py - TestProjectionBSplinePeriodicError.py - TestProjectionEllipse.py - TestProjectionEllipticArc.py - TestProjectionIntoResult.py - TestProjectionUpdate.py - TestProjectionWithoutReference.py - TestRectangle.py - TestRemainingDoF.py - TestRemoveBSpline.py - TestRemoveBSplinePeriodic.py - TestRemoveEllipse.py - TestRemoveEllipticArc.py - TestRemoveSketch.py - TestSignedDistancePointLine.py - TestSignedDistancePointPoint.py - TestSketchCopy01.py - TestSketchCopy02.py - TestSketchCopy03.py - TestSketchCopy04.py - TestSketchCopy05.py - TestSketchCopy06.py - TestSketchCopy07.py - TestSketchCopy08.py - TestSketchCopy09.py - TestSketchCopy10.py - TestSketchCopy11.py - TestSketchCopy12.py - TestSketchCopy13.py - TestSketchCopy14.py - TestSketchDrawer.py - TestSketchPointLine.py - TestSnowflake.py - TestSplit.py - TestSplitEllipse.py - TestSplitLine.py - TestSplitPreview.py - TestTrimArc01.py - TestTrimArc02.py - TestTrimArc03.py - TestTrimArc04.py - TestTrimArc05.py - TestTrimArc06.py - TestTrimArc07.py - TestTrimArc08.py - TestTrimCircle01.py - TestTrimCircle02.py - TestTrimCircle03.py - TestTrimCircle04.py - TestTrimCircle05.py - TestTrimCircleAndArc01.py - TestTrimEllipse.py - TestTrimLine01.py - TestTrimLine02.py - TestTrimLine03.py - TestTrimPreview.py - TestUpdateSketch.py -) +ADD_UNIT_TESTS(${TEST_NAMES}) + +include(tests.set) if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) - ADD_UNIT_TESTS( - TestMoveArc.py - TestMoveBSpline.py - TestMoveBSplinePeriodic.py - TestMoveCircle.py - TestMoveEllipse.py - TestMoveEllipticArc.py - TestMoveLine.py - TestMovementComplex.py - TestMovePoint.py - ) + include(tests_change_radius.set) + ADD_UNIT_TESTS(${TEST_NAMES_CHANGE_RADIUS}) endif() ADD_RESTRICTED_TESTS( Test20204.py -) \ No newline at end of file +) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) + set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS}) + install(FILES tests_change_radius.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + endif() + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/src/SketchPlugin/CTestTestfileInstall.cmake b/src/SketchPlugin/CTestTestfileInstall.cmake new file mode 100644 index 000000000..ef551e899 --- /dev/null +++ b/src/SketchPlugin/CTestTestfileInstall.cmake @@ -0,0 +1,29 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) +include(tests_change_radius.set) + +set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS}) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + add_test(${TEST_NAME} python ${tfile}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/src/SketchPlugin/tests.set b/src/SketchPlugin/tests.set new file mode 100644 index 000000000..4ba5a73c8 --- /dev/null +++ b/src/SketchPlugin/tests.set @@ -0,0 +1,234 @@ +# Copyright (C) 2021 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(TEST_NAMES + Test1061.py + Test1577.py + Test1578.py + Test1673.py + Test1779.py + Test1924.py + Test1963.py + Test1966.py + Test1967.py + Test2034_1.py + Test2034_2.py + Test2034_3.py + Test2062.py + Test2095.py + Test2115.py + Test2119.py + Test2134.py + Test2157.py + Test2157_2.py + Test2224.py + Test2229.py + Test2239.py + Test2273.py + Test2280.py + Test2287.py + Test2341.py + Test2376.py + Test2390.py + Test2393.py + Test2425.py + Test2427.py + Test2440.py + Test2481.py + Test2654.py + Test2711.py + Test2741.py + Test2810.py + Test2824.py + Test2860.py + Test2894.py + Test3019.py + Test3087_1.py + Test3087_2.py + Test3132.py + Test3154.py + Test3170.py + Test3240.py + Test19089.py + Test19101.py + Test20274_1.py + Test20274_2.py + Test20274_3.py + Test24015.py + + TestArcBehavior.py + TestBSplineAddPole.py + TestCenteredRectangle.py + TestChangeSketchPlane1.py + TestChangeSketchPlane2.py + TestChangeSketchPlane3.py + TestChangeSketchPlane4.py + TestConstraintAngle.py + TestConstraintAngle_v0_1.py + TestConstraintAngle_v0_2.py + TestConstraintAngle_v20191210_1.py + TestConstraintAngle_v20191210_2.py + TestConstraintAngleBehaviorDirect.py + TestConstraintAngleBehaviorSupplementary_1.py + TestConstraintAngleBehaviorSupplementary_2.py + TestConstraintAngleBehaviorBackward_1.py + TestConstraintAngleBehaviorBackward_2.py + TestConstraintAngleEllipse.py + TestConstraintCoincidence.py + TestConstraintCoincidenceBSpline.py + TestConstraintCoincidenceEllipse.py + TestConstraintCoincidenceEllipticArc.py + TestConstraintCollinear.py + TestConstraintCollinearEllipse.py + TestConstraintDistance.py + TestConstraintDistanceEllipse.py + TestConstraintDistanceBehavior.py + TestConstraintDistanceHorizontal.py + TestConstraintDistanceVertical.py + TestConstraintDistanceZero.py + TestConstraintDistanceHorizontalZero.py + TestConstraintDistanceVerticalZero.py + TestConstraintEqual.py + TestConstraintEqualEllipse.py + TestConstraintFixed.py + TestConstraintHorizontal.py + TestConstraintHorizontalValidator.py + TestConstraintLength.py + TestConstraintMiddlePoint.py + TestConstraintMiddlePointOnArc.py + TestConstraintMiddlePointOnEllipticArc.py + TestConstraintParallel.py + TestConstraintPerpendicular.py + TestConstraintPerpendicularArcLine.py + TestConstraintPerpendicularEllipseLine.py + TestConstraintRadius.py + TestConstraintRadiusFailure.py + TestConstraintTangent.py + TestConstraintTangentBSpline.py + TestConstraintTangentEllipse.py + TestConstraintTangentEllipticArc.py + TestConstraintVertical.py + TestCreateArcByCenterStartEnd.py + TestCreateArcByTangentEdge.py + TestCreateArcByThreePoints.py + TestCreateArcByTransversalLine.py + TestCreateArcChangeType.py + TestCreateBSpline.py + TestCreateBSplinePeriodic.py + TestCreateCircleByCenterAndPassed.py + TestCreateCircleByThreePoints.py + TestCreateCircleChangeType.py + TestCreateEllipseByCenterSemiaxisAndPassed.py + TestCreateEllipseByMajorAxisAndPassed.py + TestCreateEllipseByExternal.py + TestCreateEllipticArc.py + TestCreateEllipticArcByExternal.py + TestCreateMacroBSpline.py + TestCurveFitting1.py + TestCurveFitting2.py + TestCurveFitting3.py + TestCurveFitting4.py + TestDegeneratedGeometry.py + TestDistanceDump.py + TestDistanceSignedVsUnsigned01.py + TestDistanceSignedVsUnsigned02.py + TestDistanceSignedVsUnsigned03.py + TestDistanceSignedVsUnsigned04.py + TestDistanceSignedVsUnsigned05.py + TestEdgesOrder.py + TestFillet.py + TestFilletAfterFolder.py + TestFilletInteracting.py + TestHighload.py + TestIntersectionChangeEdge.py + TestIntersectionWithCircle.py + TestIntersectionWithLine.py + TestIntersectionWithSpline.py + TestMirror.py + TestMultiRotation.py + TestMultiRotation01.py + TestMultiRotation02.py + TestMultiRotation03.py + TestMultiRotation04.py + TestMultiRotation05.py + TestMultiRotationWithParameter.py + TestMultiTranslation.py + TestOffset1.py + TestOffset2.py + TestPresentation.py + TestProjection.py + TestProjectionBSpline.py + TestProjectionBSplinePeriodic.py + TestProjectionBSplinePeriodicError.py + TestProjectionEllipse.py + TestProjectionEllipticArc.py + TestProjectionIntoResult.py + TestProjectionUpdate.py + TestProjectionWithoutReference.py + TestRectangle.py + TestRemainingDoF.py + TestRemoveBSpline.py + TestRemoveBSplinePeriodic.py + TestRemoveEllipse.py + TestRemoveEllipticArc.py + TestRemoveSketch.py + TestSignedDistancePointLine.py + TestSignedDistancePointPoint.py + TestSketchCopy01.py + TestSketchCopy02.py + TestSketchCopy03.py + TestSketchCopy04.py + TestSketchCopy05.py + TestSketchCopy06.py + TestSketchCopy07.py + TestSketchCopy08.py + TestSketchCopy09.py + TestSketchCopy10.py + TestSketchCopy11.py + TestSketchCopy12.py + TestSketchCopy13.py + TestSketchCopy14.py + TestSketchDrawer.py + TestSketchPointLine.py + TestSnowflake.py + TestSplit.py + TestSplitEllipse.py + TestSplitLine.py + TestSplitPreview.py + TestTrimArc01.py + TestTrimArc02.py + TestTrimArc03.py + TestTrimArc04.py + TestTrimArc05.py + TestTrimArc06.py + TestTrimArc07.py + TestTrimArc08.py + TestTrimCircle01.py + TestTrimCircle02.py + TestTrimCircle03.py + TestTrimCircle04.py + TestTrimCircle05.py + TestTrimCircleAndArc01.py + TestTrimEllipse.py + TestTrimLine01.py + TestTrimLine02.py + TestTrimLine03.py + TestTrimPreview.py + TestUpdateSketch.py +) diff --git a/src/SketchPlugin/tests_change_radius.set b/src/SketchPlugin/tests_change_radius.set new file mode 100644 index 000000000..bf1b9afd0 --- /dev/null +++ b/src/SketchPlugin/tests_change_radius.set @@ -0,0 +1,30 @@ +# Copyright (C) 2021 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(TEST_NAMES_CHANGE_RADIUS + TestMoveArc.py + TestMoveBSpline.py + TestMoveBSplinePeriodic.py + TestMoveCircle.py + TestMoveEllipse.py + TestMoveEllipticArc.py + TestMoveLine.py + TestMovementComplex.py + TestMovePoint.py +) diff --git a/test.API/SHAPER/CMakeLists.txt b/test.API/SHAPER/CMakeLists.txt index 6d4f981ea..6300e90a5 100644 --- a/test.API/SHAPER/CMakeLists.txt +++ b/test.API/SHAPER/CMakeLists.txt @@ -19,34 +19,18 @@ INCLUDE(UnitTest) -ADD_UNIT_TESTS_API( - Primitives/TestBox.py - Primitives/TestCone.py - Primitives/TestCylinder.py - Primitives/TestSphere.py - Primitives/TestTorus.py - Primitives/TestAPI_Box.py - Primitives/TestAPI_Cone.py - Primitives/TestAPI_Cylinder.py - Primitives/TestAPI_Sphere.py - Primitives/TestAPI_Torus.py - #GDML/TestConeSegment.py - #GDML/TestAPI_ConeSegment.py - Transformations/TestAPI_MultiRotation.py - Transformations/TestAPI_MultiTranslation.py - Transformations/TestAPI_Rotation.py - Transformations/TestAPI_Scale.py - Transformations/TestAPI_Symmetry.py - Transformations/TestAPI_Translation.py - Transformations/TestMultiRotation.py - Transformations/TestMultiTranslation.py - Transformations/TestRotation.py - Transformations/TestScale.py - Transformations/TestSymmetry.py - Transformations/TestTranslation_1.py - Transformations/TestTranslation_2.py - Transformations/TestTranslation_3.py - Transformations/TestTranslation_4.py - Transformations/TestTranslation_5.py - Transformations/TestTranslation.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/test_API") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + message(${TEST_NAMES}) + install(FILES ${TEST_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME}) diff --git a/test.API/SHAPER/CTestTestfileInstall.cmake b/test.API/SHAPER/CTestTestfileInstall.cmake new file mode 100644 index 000000000..38b15e809 --- /dev/null +++ b/test.API/SHAPER/CTestTestfileInstall.cmake @@ -0,0 +1,27 @@ +# Copyright (C) 2021 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 +# + +include(tests.set) + +foreach(tfile ${TEST_NAMES}) + set(TEST_NAME ${COMPONENT_NAME}_${tfile}) + get_filename_component(tfile_without_dir ${tfile} NAME) + add_test(${TEST_NAME} python ${tfile_without_dir}) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}") +endforeach() diff --git a/test.API/SHAPER/tests.set b/test.API/SHAPER/tests.set new file mode 100644 index 000000000..d3bd600bd --- /dev/null +++ b/test.API/SHAPER/tests.set @@ -0,0 +1,50 @@ +# Copyright (C) 2021 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(TEST_NAMES + Primitives/TestBox.py + Primitives/TestCone.py + Primitives/TestCylinder.py + Primitives/TestSphere.py + Primitives/TestTorus.py + Primitives/TestAPI_Box.py + Primitives/TestAPI_Cone.py + Primitives/TestAPI_Cylinder.py + Primitives/TestAPI_Sphere.py + Primitives/TestAPI_Torus.py + #GDML/TestConeSegment.py + #GDML/TestAPI_ConeSegment.py + Transformations/TestAPI_MultiRotation.py + Transformations/TestAPI_MultiTranslation.py + Transformations/TestAPI_Rotation.py + Transformations/TestAPI_Scale.py + Transformations/TestAPI_Symmetry.py + Transformations/TestAPI_Translation.py + Transformations/TestMultiRotation.py + Transformations/TestMultiTranslation.py + Transformations/TestRotation.py + Transformations/TestScale.py + Transformations/TestSymmetry.py + Transformations/TestTranslation_1.py + Transformations/TestTranslation_2.py + Transformations/TestTranslation_3.py + Transformations/TestTranslation_4.py + Transformations/TestTranslation_5.py + Transformations/TestTranslation.py +) diff --git a/test.hdfs/CMakeLists.txt b/test.hdfs/CMakeLists.txt index 64f59848b..8b5d695aa 100644 --- a/test.hdfs/CMakeLists.txt +++ b/test.hdfs/CMakeLists.txt @@ -41,7 +41,6 @@ foreach(eachFilePath IN LISTS hdfFilesCur hdfFilesRestr) endif() endforeach() -SET(COMPONENT_NAME SHAPER) SET(TIMEOUT 600) SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/HDFs")