From 253b5399677d5663112eb637a820098eae5d4626 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Wed, 27 Mar 2019 16:29:55 +0100 Subject: [PATCH] Fix ADAO test install --- CMakeLists.txt | 19 +++++++----- COPYING => COPYING.txt | 0 README => README.txt | 0 src/CMakeLists.txt | 8 ++--- ...leInstall.cmake.in => CTestTestfile.cmake} | 29 +++++++++++-------- 5 files changed, 32 insertions(+), 24 deletions(-) rename COPYING => COPYING.txt (100%) rename README => README.txt (100%) rename test/{CTestTestfileInstall.cmake.in => CTestTestfile.cmake} (52%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b120b7f..a847775 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ set(ADAO_RES "share/resources/adao") set(ADAO_RES_SALOME "share/salome/resources/adao") set(ADAO_BIN "bin") set(ADAO_BIN_TEST "bin/salome/test") +set(ADAO_TEST "share/test/adao") set(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") if(EXISTS ${CONFIGURATION_ROOT_DIR}) @@ -55,31 +56,36 @@ endif() if(ADAO_PYTHON_MODULE) + install(FILES COPYING.txt README.txt DESTINATION $ENV{CURRENT_SOFTWARE_INSTALL_DIR}) + if(ADAO_BUILD_DOC) find_package(SalomeSphinx) if(NOT SPHINX_FOUND) message(FATAL_ERROR "Sphinx has not been found !") endif(NOT SPHINX_FOUND) endif(ADAO_BUILD_DOC) - + add_subdirectory(src) add_subdirectory(resources) add_subdirectory(bin) add_subdirectory(i18n) add_subdirectory(doc) - + add_subdirectory(test) + else(ADAO_PYTHON_MODULE) # ADAO_SALOME_MODULE + install(FILES COPYING.txt README.txt DESTINATION $ENV{CURRENT_SOFTWARE_INSTALL_DIR}) find_package(SalomeOmniORB REQUIRED) find_package(SalomeOmniORBPy REQUIRED) find_package(SalomeKERNEL REQUIRED) KERNEL_WITH_CORBA() - + if(NOT ADAO_PYTHON_ROOT_DIR) message(FATAL_ERROR "ADAO_PYTHON_ROOT_DIR cmake variable has to be set if ADAO_SALOME_MODULE option is ON.") endif(NOT ADAO_PYTHON_ROOT_DIR) + find_file(FILE_OF_ADAO_PYTHON_MODULE "daCore/__init__.py" PATHS "${ADAO_PYTHON_ROOT_DIR}/${ADAO_SCRIPT_PYTHON}/adao") if(NOT FILE_OF_ADAO_PYTHON_MODULE) message(FATAL_ERROR "Could not locate daCore/__init__.py into specified ADAO_PYTHON_ROOT_DIR directory ! Sounds bad !") @@ -88,16 +94,15 @@ else(ADAO_PYTHON_MODULE) if(NOT EFICAS_ROOT_DIR) message(FATAL_ERROR "EFICAS_ROOT_DIR is absolutely needed !") endif(NOT EFICAS_ROOT_DIR) - - find_file(FILE_OF_EFICAS "generator/__init__.py" PATHS ${EFICAS_ROOT_DIR}) + find_file(FILE_OF_EFICAS "generator/__init__.py" PATHS ${EFICAS_ROOT_DIR}) if(NOT FILE_OF_EFICAS) message(FATAL_ERROR "Could not locate generator/__init__.py into EFICAS_ROOT_DIR") endif(NOT FILE_OF_EFICAS) - + add_subdirectory(src) add_subdirectory(idl) add_subdirectory(resources) add_subdirectory(test) - + endif(ADAO_PYTHON_MODULE) diff --git a/COPYING b/COPYING.txt similarity index 100% rename from COPYING rename to COPYING.txt diff --git a/README b/README.txt similarity index 100% rename from README rename to README.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0d7263a..a6c74b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,13 +19,11 @@ # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D if(ADAO_SALOME_MODULE) - - #install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao") + add_subdirectory(daSalome) - + else(ADAO_SALOME_MODULE) - - #install(FILES daSalome/adaoBuilder.py daSalome/__init__.py DESTINATION "${ADAO_SCRIPT_PYTHON_SALOME}/adao") + add_subdirectory(daSalome) add_subdirectory(daComposant) add_subdirectory(daEficas) diff --git a/test/CTestTestfileInstall.cmake.in b/test/CTestTestfile.cmake similarity index 52% rename from test/CTestTestfileInstall.cmake.in rename to test/CTestTestfile.cmake index da05965..090c09d 100644 --- a/test/CTestTestfileInstall.cmake.in +++ b/test/CTestTestfile.cmake @@ -18,23 +18,28 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D -SET(SALOME_TEST_DRIVER "@CMAKE_INSTALL_PREFIX@/bin/salome/appliskel/salome_test_driver.py") +SET(ADAO_ENGINE_ROOT_DIR $ENV{ADAO_ENGINE_ROOT_DIR}) + +if(NOT ADAO_ENGINE_ROOT_DIR) + message(FATAL_ERROR "ADAO_ENGINE_ROOT_DIR environment variable has to be set before launching the tests.") +endif(NOT ADAO_ENGINE_ROOT_DIR) SET(COMPONENT_NAME ADAO) SET(TIMEOUT 500) # Add all test subdirs SUBDIRS( - test1001 - test1002 - test6701 - test6702 - test6703 - test6704 - test6711 - test6901 - test6902 - test6903 - test6904 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test1001 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test1002 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6701 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6702 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6703 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6704 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6711 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6901 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6902 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6903 + ${ADAO_ENGINE_ROOT_DIR}/share/test/adao/test6904 ) -- 2.39.2