]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
100 tests of FiltersPlugin in salome test mechanism
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 10 Mar 2021 10:31:13 +0000 (11:31 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 10 Mar 2021 10:31:13 +0000 (11:31 +0100)
src/CTestTestfileInstall.cmake
src/FiltersPlugin/CMakeLists.txt
src/FiltersPlugin/CTestTestfileInstall.cmake [new file with mode: 0644]
src/FiltersPlugin/tests.set [new file with mode: 0644]

index c09ba1ab910860ea1e9d369a1ed8021cddf6e347..b2620f5cee7444c66f49d5055ce07b53045838d1 100644 (file)
@@ -29,4 +29,5 @@ SUBDIRS(ConnectorAPI
         ConstructionPlugin
         SketchPlugin
         ModelAPI
+        FiltersPlugin
 )
index 1c9bca5922e61a9fc274b9b8c2c653d151363ce6..7a847641fd23aee198aa0b6417bc65b2c1391656 100644 (file)
@@ -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 (file)
index 0000000..ceaee95
--- /dev/null
@@ -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 (file)
index 0000000..722601d
--- /dev/null
@@ -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
+)