From: Anthony Geay Date: Wed, 10 Mar 2021 07:48:15 +0000 (+0100) Subject: 222 tests of SketchPlugin in salome test mechanism X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17a4419f689e91a22f3c59cfb0ad7b4ec83476e5;p=modules%2Fshaper.git 222 tests of SketchPlugin in salome test mechanism --- diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake index 82bbcf525..9f6527fd4 100644 --- a/src/CTestTestfileInstall.cmake +++ b/src/CTestTestfileInstall.cmake @@ -26,4 +26,6 @@ set(SALOME_TEST_LABEL_ADV SHAPER_ADV) SUBDIRS(ConnectorAPI HDFs FeaturesPlugin + ConstructionPlugin + SketchPlugin ) 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/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index 938382105..c185498b0 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -183,221 +183,9 @@ 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}) if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) ADD_UNIT_TESTS( @@ -415,4 +203,21 @@ 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) + 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..ceaee95f9 --- /dev/null +++ b/src/SketchPlugin/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/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 +)