From: Bernard Sécherà Date: Mon, 5 Oct 2020 06:31:18 +0000 (+0200) Subject: set environment for tests X-Git-Tag: V9_6_0~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a3dc907a7c05ce4bccfc7d2e321c58fc79874008;p=tools%2Fsolverlab.git set environment for tests --- diff --git a/CDMATH/tests/CMakeLists.txt b/CDMATH/tests/CMakeLists.txt index e343ec9..97e7a7a 100755 --- a/CDMATH/tests/CMakeLists.txt +++ b/CDMATH/tests/CMakeLists.txt @@ -33,7 +33,7 @@ IF (CDMATH_WITH_TESTS) endif(CDMATH_WITH_PETSC) if (CDMATH_WITH_PYTHON) - SET(TESTS_PYTHON_PATH ${CMAKE_BINARY_DIR}/CDMATH/swig:${CMAKE_BINARY_DIR}/CDMATH/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PV_PYTHON_DIR} ) + SET(TESTS_PYTHON_PATH ${CMAKE_BINARY_DIR}/CDMATH/swig:${CMAKE_BINARY_DIR}/CDMATH/postprocessing:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${PARAVIEW_ROOT_DIR}/lib/:${PARAVIEW_ROOT_DIR}/lib/python3.6/site-packages/:${PARAVIEW_ROOT_DIR}/lib/python3.6/site-packages/vtkmodules/:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PYTHONPATH} ) endif(CDMATH_WITH_PYTHON) TARGET_LINK_LIBRARIES(TestCDMATH TestMesh base mesh ${CPPUNIT_LIBS} ${_extra_lib_TESTS}) diff --git a/CDMATH/tests/examples/TransportEquation1DUpwindImplicit/CMakeLists.txt b/CDMATH/tests/examples/TransportEquation1DUpwindImplicit/CMakeLists.txt index d85f8c2..1daa0c6 100755 --- a/CDMATH/tests/examples/TransportEquation1DUpwindImplicit/CMakeLists.txt +++ b/CDMATH/tests/examples/TransportEquation1DUpwindImplicit/CMakeLists.txt @@ -6,14 +6,14 @@ if (CDMATH_WITH_PYTHON ) SET(CFL 1 )#Courant Friedrichs Lewy number ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindImplicit.py ${NX} ${CFL}) - SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}") - SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}") + SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}:${Python_ROOT_DIR}/lib") + SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL1 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}") SET(CFL 2 )#Courant Friedrichs Lewy number ADD_TEST(ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/1DTransportEquationUpwindImplicit.py ${NX} ${CFL}) - SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}") - SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${PV_PYTHON_DIR}") + SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${MEDCOUPLING_ROOT_DIR}/lib:${MEDFILE_ROOT_DIR}/lib:${CMAKE_INSTALL_PREFIX}/lib/medcoupling:${CMAKE_INSTALL_PREFIX}/lib/med:${PETSC_DIR}/${PETSC_ARCH}/lib:${HDF5_ROOT_DIR}/lib:${PV_LIB_DIR}:${Python_ROOT_DIR}/lib") + SET_PROPERTY(TEST ExampleTransportEquation_1DFV_Upwind_Implicit_CFL2 APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath:${CMAKE_INSTALL_PREFIX}/bin/cdmath/postprocessing:${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON}:${MATPLOTLIB_ROOT_DIR}/lib/python3.6/site-packages:${PV_PYTHON_DIR}") endif (CDMATH_WITH_PYTHON ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ac7080..ee55711 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,12 @@ list (APPEND CMAKE_MODULE_PATH "${SOLVERLAB_SOURCE_DIR}/cmake_files") include(ExternalProject)#For PETSc, MED and MEDCoupling +set(Python_ROOT_DIR $ENV{PYTHON_ROOT_DIR} ) +set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} ) +set(MATPLOTLIB_ROOT_DIR $ENV{MATPLOTLIB_ROOT_DIR} ) +set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} ) + + ###################################################### # Detection or compilation of PETSc+SLEPc+HDF5 # ######################################################