From: dbv Date: Thu, 25 Feb 2016 07:22:08 +0000 (+0300) Subject: Unit tests fix X-Git-Tag: V_2.2.0~72 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cbf6526d07352f6c13a1ec686dee48f163373fe8;p=modules%2Fshaper.git Unit tests fix --- diff --git a/CMakeCommon/UnitTest.cmake b/CMakeCommon/UnitTest.cmake index c7b9245a0..af133e197 100644 --- a/CMakeCommon/UnitTest.cmake +++ b/CMakeCommon/UnitTest.cmake @@ -10,15 +10,15 @@ # or # SET(PROJECT_UNIT_TESTS # TestUndoRedo.py -# TestWhatever.py +# TestWhatever.py # ) # ADD_UNIT_TESTS(${PROJECT_UNIT_TESTS}) # -# Where "TestUndoRedo.py" and "TestResultBody.py" are names +# Where "TestUndoRedo.py" and "TestResultBody.py" are names # of python test scripts in the "./Test" directory. -# This macro will add "Subproject_" as prefix and -# remove ".py" for the test name automaticaly. -# +# This macro will add "Subproject_" as prefix and +# remove ".py" for the test name automaticaly. +# # Start building of the "RUN_TESTS" project in the Visual studio # or run "make test" on linux stations to start the testing procedure. # @@ -27,27 +27,27 @@ ENABLE_TESTING() MACRO(ADD_UNIT_TESTS) if (WIN32) # different separators and path to libraries variable name - SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/bin;${CMAKE_INSTALL_PREFIX}/swig;${CMAKE_INSTALL_PREFIX}/plugins;${SUIT_LIB_DIR};$ENV{PATH}") + SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};$ENV{PATH}") STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}") STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}") - SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/swig;${CMAKE_INSTALL_PREFIX}/plugins;${CMAKE_INSTALL_PREFIX}/addons;${CMAKE_INSTALL_PREFIX}/PythonAPI;$ENV{PYTHONPATH}") + SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PYTHON_API};$ENV{PYTHONPATH}") STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}") STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}") else() - SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/bin:${CMAKE_INSTALL_PREFIX}/swig:${CMAKE_INSTALL_PREFIX}/plugins:${SUIT_LIB_DIR}:$ENV{LD_LIBRARY_PATH}") - SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/swig:${CMAKE_INSTALL_PREFIX}/plugins:${CMAKE_INSTALL_PREFIX}/addons:${CMAKE_INSTALL_PREFIX}/PythonAPI:$ENV{PYTHONPATH}") + SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:$ENV{LD_LIBRARY_PATH}") + SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PYTHON_API}:$ENV{PYTHONPATH}") endif() - SET(_CONFIG_FILE "${CMAKE_INSTALL_PREFIX}/plugins") + SET(_CONFIG_FILE "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_XML_RESOURCES}") foreach(eachFileName ${ARGN}) - # Strip the ".py" suffix + # Strip the ".py" suffix GET_FILENAME_COMPONENT(aTestName ${eachFileName} NAME_WE) # Add "SubprojectName_" prefix GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME) SET(aTestName "${aSubprojectName}_${aTestName}") - # Full path to the python test file beeing executed + # Full path to the python test file beeing executed SET(aTestFileName "${CMAKE_CURRENT_SOURCE_DIR}/Test/${eachFileName}") IF(EXISTS ${aTestFileName}) ADD_TEST(NAME ${aTestName} @@ -66,4 +66,3 @@ MACRO(ADD_UNIT_TESTS) ENDIF(EXISTS ${aTestFileName}) endforeach(eachFileName ${ARGN}) ENDMACRO(ADD_UNIT_TESTS) -