From: Cédric Aguerre Date: Mon, 18 Apr 2016 16:47:31 +0000 (+0200) Subject: [salome test] Install tests X-Git-Tag: V8_1_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b37d0bc961bed2fb787aae587ec41b357015f543;p=modules%2Fmed.git [salome test] Install tests --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 54fbb953f..f655ba55a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ IF(SALOME_BUILD_GUI) FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) ELSE() FIND_PACKAGE(SalomeQt5 REQUIRED) - ENDIF() + ENDIF() ENDIF(SALOME_BUILD_GUI) IF(SALOME_MED_ENABLE_PYTHON) @@ -229,7 +229,7 @@ IF(SALOME_USE_MPI) LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedcouplingcorba paramedmemcompo) ENDIF() -LIST(APPEND _${PROJECT_NAME}_exposed_targets +LIST(APPEND _${PROJECT_NAME}_exposed_targets medcouplingcorba medcouplingclient medcalculator MEDFactoryEngine) IF(SALOME_MED_ENABLE_PYTHON) LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculatorspython) @@ -274,11 +274,11 @@ SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") # Build variables that will be expanded when configuring SalomeConfig.cmake: IF(NOT SALOME_GUI_BUILD_WITH_QT5) - SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx - PThread Python) - ELSE() - SALOME_CONFIGURE_PREPARE(MEDCoupling Qt5 MPI omniORB CppUnit Graphviz Doxygen Sphinx - PThread Python) + SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx + PThread Python) + ELSE() + SALOME_CONFIGURE_PREPARE(MEDCoupling Qt5 MPI omniORB CppUnit Graphviz Doxygen Sphinx + PThread Python) ENDIF() CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in @@ -286,7 +286,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT_ROOT_DIR MPI_ROOT_DIR - OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR + OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR SPHINX_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @@ -302,3 +302,8 @@ INSTALL(FILES # Install the export set for use with the install-tree INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" FILE ${PROJECT_NAME}Targets.cmake) + +# Application tests +INSTALL(FILES CTestTestfileInstall.cmake + DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test + RENAME CTestTestfile.cmake) diff --git a/CTestTestfileInstall.cmake b/CTestTestfileInstall.cmake new file mode 100644 index 000000000..65850b7d6 --- /dev/null +++ b/CTestTestfileInstall.cmake @@ -0,0 +1,23 @@ +# 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(COMPONENT_NAME MEDCalc) +SET(TIMEOUT 300) + +SUBDIRS(MEDCalculator) diff --git a/src/MEDCalculator/Test/CMakeLists.txt b/src/MEDCalculator/Test/CMakeLists.txt index 0043ee90a..e7e937c4e 100644 --- a/src/MEDCalculator/Test/CMakeLists.txt +++ b/src/MEDCalculator/Test/CMakeLists.txt @@ -45,7 +45,7 @@ INSTALL(TARGETS TestMEDCalculator DESTINATION ${SALOME_INSTALL_BINS}) # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDCoupling/MEDCalculator) +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDCalculator) INSTALL(TARGETS TestMEDCalculator DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake diff --git a/src/MEDCalculator/Test/CTestTestfileInstall.cmake b/src/MEDCalculator/Test/CTestTestfileInstall.cmake index 20cb6a16f..e79a45278 100644 --- a/src/MEDCalculator/Test/CTestTestfileInstall.cmake +++ b/src/MEDCalculator/Test/CTestTestfileInstall.cmake @@ -17,5 +17,15 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_TEST(TestMEDCalculator TestMEDCalculator) -SET_TESTS_PROPERTIES(TestMEDCalculator PROPERTIES LABELS "${COMPONENT_NAME}") +SET(TEST_NAMES + TestMEDCalculator +) + +FOREACH(tfile ${TEST_NAMES}) + SET(TEST_NAME ${COMPONENT_NAME}_${tfile}) + ADD_TEST(${TEST_NAME} ${tfile}) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + TIMEOUT ${TIMEOUT} + ) +ENDFOREACH()