From 0cb7d7259fad6ff76caf963f7528bf466a70492d Mon Sep 17 00:00:00 2001 From: Gerald NICOLAS Date: Wed, 13 Jan 2016 16:57:06 +0100 Subject: [PATCH] Utiltaires pour CMake --- src/CTestTestfileInstall.cmake | 25 ++++++++++++++ src/tests/Test/CMakeLists.txt | 39 +++++++++++++++++++++ src/tests/Test/CTestTestfileInstall.cmake | 41 +++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 src/CTestTestfileInstall.cmake create mode 100755 src/tests/Test/CMakeLists.txt create mode 100644 src/tests/Test/CTestTestfileInstall.cmake diff --git a/src/CTestTestfileInstall.cmake b/src/CTestTestfileInstall.cmake new file mode 100644 index 00000000..d6c725b7 --- /dev/null +++ b/src/CTestTestfileInstall.cmake @@ -0,0 +1,25 @@ +# Copyright (C) 2016 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 +# + +# Add all test subdirs +SUBDIRS( + tests + ) + + diff --git a/src/tests/Test/CMakeLists.txt b/src/tests/Test/CMakeLists.txt new file mode 100755 index 00000000..f6250317 --- /dev/null +++ b/src/tests/Test/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (C) 2016 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 +# + +# For salome test +SET(HOMARD_TEST_FILES + test_1.py + test_2.py + test_3.py + test_4.py + tutorial_1.py + tutorial_2.py + tutorial_3.py + tutorial_4.py + tutorial_5.py + test_util.py +) + +INSTALL(FILES ${HOMARD_TEST_FILES} + DESTINATION ${SALOME_HOMARD_INSTALL_TEST}) + +INSTALL(FILES CTestTestfileInstall.cmake + DESTINATION ${SALOME_HOMARD_INSTALL_TEST} + RENAME CTestTestfile.cmake) \ No newline at end of file diff --git a/src/tests/Test/CTestTestfileInstall.cmake b/src/tests/Test/CTestTestfileInstall.cmake new file mode 100644 index 00000000..7e8c01fc --- /dev/null +++ b/src/tests/Test/CTestTestfileInstall.cmake @@ -0,0 +1,41 @@ +# Copyright (C) 2016 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(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") + +SET(COMPONENT_NAME HOMARD) +SET(TIMEOUT 500) + +SET(HOMARD_TEST_FILES +test_1 +test_2 +test_3 +test_4 +tutorial_1 +tutorial_2 +tutorial_3 +tutorial_4 +tutorial_5 +) + +FOREACH(tfile ${HOMARD_TEST_FILES}) + SET(TEST_NAME HOMARD_${tfile}) + ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") +ENDFOREACH() -- 2.39.2