From 9712b7e66839d6bb84389a1ce64a5532aba7c0ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Thu, 13 Jul 2017 11:55:16 +0200 Subject: [PATCH] salome test - Fix bug in GEOM tests list --- CMakeLists.txt | 61 ++++++++++--------- CTestTestfileInstall.cmake | 26 ++++++++ doc/salome/examples/CMakeLists.txt | 2 +- .../examples/CTestTestfileInstall.cmake | 4 -- src/XAO/tests/CMakeLists.txt | 2 +- src/XAO/tests/CTestTestfileInstall.cmake | 6 +- 6 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 CTestTestfileInstall.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 00cd53e15..61412c097 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ PROJECT(SalomeGEOM C CXX) # Ensure a proper linker behavior: CMAKE_POLICY(SET CMP0003 NEW) IF(WIN32) - CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib + CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib ENDIF(WIN32) # Versioning @@ -70,7 +70,7 @@ SET(BUILD_SHARED_LIBS TRUE) # Local macros: LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") -# User options +# User options # ============ OPTION(SALOME_BUILD_DOC "Generate SALOME GEOM documentation" ON) OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) @@ -104,7 +104,7 @@ FIND_PACKAGE(SalomeOmniORBPy REQUIRED) FIND_PACKAGE(SalomeLibXml2 REQUIRED) FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C) -# Other KERNEL optionals: +# Other KERNEL optionals: IF(SALOME_BUILD_TESTS) ENABLE_TESTING() FIND_PACKAGE(SalomeCppUnit) @@ -124,7 +124,7 @@ IF(SALOME_BUILD_GUI) LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGUI) SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA - SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT + SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_PYCONSOLE) ADD_DEFINITIONS(${GUI_DEFINITIONS}) INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS}) @@ -180,18 +180,18 @@ SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOM SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs") SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files") SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers") -SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH "Install path: SALOME scripts") -SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH "Install path: SALOME script data") -SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH "Install path: SALOME Python scripts") SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff") -SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH +SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH "Install path: SALOME Python shared modules") SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files") -SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH - "Install path: local SALOME CMake files") +SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH + "Install path: local SALOME CMake files") SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH "Install path: local SALOME config files (obsolete, to be removed)") @@ -199,11 +199,11 @@ SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation") # Specific to GEOM: -SET(SALOME_GEOM_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/geom" CACHE PATH +SET(SALOME_GEOM_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/geom" CACHE PATH "Install path: SALOME GEOM specific data") -SET(SALOME_GEOM_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/geom" CACHE PATH +SET(SALOME_GEOM_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/geom" CACHE PATH "Install path: SALOME GEOM scripts") -SET(SALOME_GEOM_INSTALL_PLUGINS share/salome/plugins/geom CACHE PATH +SET(SALOME_GEOM_INSTALL_PLUGINS share/salome/plugins/geom CACHE PATH "Install path: SALOME GEOM plugins") MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) @@ -217,9 +217,9 @@ MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED}) -SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) -# Sources +# Sources # ======== ADD_SUBDIRECTORY(idl) @@ -243,15 +243,15 @@ INCLUDE(CMakePackageConfigHelpers) # List of targets in this project we want to make visible to the rest of the world. # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" -SET(_${PROJECT_NAME}_exposed_targets +SET(_${PROJECT_NAME}_exposed_targets GEOMArchimede BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl GEOMUtils GEOMEngine GEOM_SupervEngine GEOMSketcher - SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine + SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine SalomeIDLSTLPlugin SalomeIDLBREPPlugin SalomeIDLSTEPPlugin SalomeIDLIGESPlugin SalomeIDLXAOPlugin - STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine + STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine ) IF(SALOME_BUILD_GUI) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject OperationGUI PrimitiveGUI RepairGUI TransformationGUI @@ -263,7 +263,7 @@ IF(SALOME_BUILD_GUI) ENDIF(SALOME_BUILD_GUI) IF(SALOME_GEOM_USE_VTK) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets OCC2VTK VTKPluginEngine SalomeIDLVTKPlugin @@ -271,7 +271,7 @@ IF(SALOME_GEOM_USE_VTK) ENDIF(SALOME_GEOM_USE_VTK) IF(SALOME_GEOM_USE_OPENCV) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets GEOMShapeRec ) ENDIF(SALOME_GEOM_USE_OPENCV) @@ -294,7 +294,7 @@ SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/inc # Build variables that will be expanded when configuring SalomeConfig.cmake: SALOME_CONFIGURE_PREPARE(OpenCV CAS VTK) - + CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" @@ -302,19 +302,19 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR) # - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?): -# Get the relative path of the include directory so +# Get the relative path of the include directory so # we can register it in the generated configuration files: #SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") -#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in +#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in # ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake # INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}" -# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX +# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX # KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} COMPATIBILITY AnyNewerVersion) - + # Install the CMake configuration files: INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @@ -322,5 +322,10 @@ INSTALL(FILES DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}") # Install the export set for use with the install-tree -INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" +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..f1f002aa5 --- /dev/null +++ b/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2017 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{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") + +SET(COMPONENT_NAME GEOM) +SET(TIMEOUT 300) + +SUBDIRS(examples) +SUBDIRS(xao) diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 89e9fe23c..0cf0a7161 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -33,7 +33,7 @@ SALOME_INSTALL_SCRIPTS("${EXAMPLES_TESTS}" ${SALOME_INSTALL_DOC}/examples/GEOM) # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/examples) INSTALL(FILES ${GOOD_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index 1661a1d3b..9ea1b156f 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -17,10 +17,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") -SET(COMPONENT_NAME GEOM) -SET(TIMEOUT 300) - INCLUDE(tests.set) FOREACH(tfile ${GOOD_TESTS}) diff --git a/src/XAO/tests/CMakeLists.txt b/src/XAO/tests/CMakeLists.txt index 5fd9d63ef..30ee76775 100644 --- a/src/XAO/tests/CMakeLists.txt +++ b/src/XAO/tests/CMakeLists.txt @@ -65,7 +65,7 @@ INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS}) # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao) INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake diff --git a/src/XAO/tests/CTestTestfileInstall.cmake b/src/XAO/tests/CTestTestfileInstall.cmake index 2245e173e..1014dbc95 100644 --- a/src/XAO/tests/CTestTestfileInstall.cmake +++ b/src/XAO/tests/CTestTestfileInstall.cmake @@ -17,9 +17,5 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") -SET(COMPONENT_NAME GEOM) -SET(TIMEOUT 300) - ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO) -SET_TESTS_PROPERTIES(GEOM_GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}") +SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}") -- 2.39.2