]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
CMake:
authormpa <mpa@opencascade.com>
Tue, 3 Dec 2013 14:23:02 +0000 (14:23 +0000)
committermpa <mpa@opencascade.com>
Tue, 3 Dec 2013 14:23:02 +0000 (14:23 +0000)
-generate tests environment to run test

src/MEDCoupling_Swig/CMakeLists.txt

index d136337d2fcc93b1244db3e92b2d320630d1a5cd..29b0934aabd71d840d6add61621e2790a2bd9c5a 100644 (file)
@@ -78,13 +78,16 @@ INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingRefCountObject.i MEDC
 INSTALL(FILES MEDCouplingBasicsTest.py MEDCouplingRemapperTest.py MEDCouplingDataForTest.py MEDCouplingNumPyTest.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON})
 INSTALL(FILES MEDCouplingExamplesTest.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON})
 
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+
 ADD_TEST(MEDCouplingBasicsTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingBasicsTest.py)
+SET_TESTS_PROPERTIES(MEDCouplingBasicsTest PROPERTIES ENVIRONMENT "${tests_env}")
 ADD_TEST(MEDCouplingExamplesTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingExamplesTest.py)
+SET_TESTS_PROPERTIES(MEDCouplingExamplesTest PROPERTIES ENVIRONMENT "${tests_env}")
 ADD_TEST(MEDCouplingRemapperTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingRemapperTest.py)
-SET_TESTS_PROPERTIES(MEDCouplingBasicsTest MEDCouplingExamplesTest MEDCouplingRemapperTest
-                     PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}:$ENV{LD_LIBRARY_PATH}")
+SET_TESTS_PROPERTIES(MEDCouplingRemapperTest PROPERTIES ENVIRONMENT "${tests_env}")
+
 IF(NUMPY_FOUND)
   ADD_TEST(MEDCouplingNumPyTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingNumPyTest.py)
-  SET_TESTS_PROPERTIES(MEDCouplingNumPyTest
-                       PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}:$ENV{LD_LIBRARY_PATH}")
+  SET_TESTS_PROPERTIES(MEDCouplingNumPyTest PROPERTIES ENVIRONMENT "${tests_env}")
 ENDIF(NUMPY_FOUND)