]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Unit tests fix
authordbv <dbv@opencascade.com>
Thu, 25 Feb 2016 07:22:08 +0000 (10:22 +0300)
committerdbv <dbv@opencascade.com>
Thu, 25 Feb 2016 07:22:08 +0000 (10:22 +0300)
CMakeCommon/UnitTest.cmake

index c7b9245a0e58c9967145b170bc7fb7590bf7d8da..af133e197ffc3a1dc703dcec5df72c79fbd137c2 100644 (file)
 # 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)
-