From 6a59122faaf6850c956099107a46c4034effc3b7 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 11 Mar 2021 15:37:56 +0100 Subject: [PATCH] OK for GDMLPlugin PartSetAPI GeomDataAPI Config ExchangeAPI ModelGeomAlgo Locale --- src/CTestTestfileInstall.cmake | 5 ++++ src/Config/CMakeLists.txt | 24 +++++++++++++++--- src/Config/CTestTestfileInstall.cmake | 26 ++++++++++++++++++++ src/Config/tests.set | 22 +++++++++++++++++ src/ExchangeAPI/CMakeLists.txt | 25 +++++++++++++++---- src/ExchangeAPI/CTestTestfileInstall.cmake | 26 ++++++++++++++++++++ src/ExchangeAPI/tests.set | 22 +++++++++++++++++ src/GeomDataAPI/CMakeLists.txt | 21 +++++++++++++++- src/GeomDataAPI/CTestTestfileInstall.cmake | 26 ++++++++++++++++++++ src/GeomDataAPI/tests.set | 22 +++++++++++++++++ src/Locale/CMakeLists.txt | 23 ++++++++++++++--- src/Locale/CTestTestfileInstall.cmake | 26 ++++++++++++++++++++ src/Locale/tests.set | 22 +++++++++++++++++ src/ModelGeomAlgo/CMakeLists.txt | 21 +++++++++++++++- src/ModelGeomAlgo/CTestTestfileInstall.cmake | 26 ++++++++++++++++++++ src/ModelGeomAlgo/tests.set | 22 +++++++++++++++++ 16 files changed, 345 insertions(+), 14 deletions(-) create mode 100644 src/Config/CTestTestfileInstall.cmake create mode 100644 src/Config/tests.set create mode 100644 src/ExchangeAPI/CTestTestfileInstall.cmake create mode 100644 src/ExchangeAPI/tests.set create mode 100644 src/GeomDataAPI/CTestTestfileInstall.cmake create mode 100644 src/GeomDataAPI/tests.set create mode 100644 src/Locale/CTestTestfileInstall.cmake create mode 100644 src/Locale/tests.set create mode 100644 src/ModelGeomAlgo/CTestTestfileInstall.cmake create mode 100644 src/ModelGeomAlgo/tests.set diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake index 69bdc7de5..3e2903ec2 100644 --- a/src/CTestTestfileInstall.cmake +++ b/src/CTestTestfileInstall.cmake @@ -41,4 +41,9 @@ SUBDIRS(ConnectorAPI SketchAPI ConstructionAPI PartSetAPI + GeomDataAPI + Config + ExchangeAPI + ModelGeomAlgo + Locale ) 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/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/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/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 +) -- 2.39.2