]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Launch restricted models tests if repository is accessible.
authormpv <mpv@opencascade.com>
Mon, 25 Mar 2019 10:09:04 +0000 (13:09 +0300)
committermpv <mpv@opencascade.com>
Mon, 25 Mar 2019 10:09:04 +0000 (13:09 +0300)
test.compatibility/CMakeLists.txt
test.models/CMakeLists.txt

index 9782b9edf320f69cd9a877f6185946472597506d..ba9d5e126ffe8f810261b617d309a722063cefce 100644 (file)
@@ -21,6 +21,12 @@ ENABLE_TESTING()
 
 file(GLOB pyFiles "*.py")
 
+SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
+
+if (EXISTS ${RESTRICTED_ROOT_DIR})
+  file(GLOB pyFilesRestr "${RESTRICTED_ROOT_DIR}/SHAPER/test.compatibility/*.py")
+endif()
+
 if (WIN32) # different separators and path to libraries variable name
   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}")
@@ -33,7 +39,7 @@ else()
   SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
 endif()
 
-foreach(eachFilePath ${pyFiles})
+foreach(eachFilePath ${pyFiles};${pyFilesRestr})
   # Strip the ".py" suffix
   GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)
 
index c34813269dcfa525bb6ae36fa547732b65427f93..32b7cbbc1955f269afb56ac0c9d397e8927c46d6 100644 (file)
@@ -21,6 +21,12 @@ ENABLE_TESTING()
 
 file(GLOB pyFiles "*.py")
 
+SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
+
+if (EXISTS ${RESTRICTED_ROOT_DIR})
+  file(GLOB pyFilesRestr "${RESTRICTED_ROOT_DIR}/SHAPER/test.models/*.py")
+endif()
+
 if (WIN32) # different separators and path to libraries variable name
   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}")
@@ -33,7 +39,7 @@ else()
   SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
 endif()
 
-foreach(eachFilePath ${pyFiles})
+foreach(eachFilePath ${pyFiles};${pyFilesRestr})
   # Strip the ".py" suffix
   GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)