From: mpv Date: Mon, 25 Mar 2019 10:09:04 +0000 (+0300) Subject: Launch restricted models tests if repository is accessible. X-Git-Tag: V9_3_0b2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2dd75e4dc2ae0ed886f21db6122230e03d8a3e97;p=modules%2Fshaper.git Launch restricted models tests if repository is accessible. --- diff --git a/test.compatibility/CMakeLists.txt b/test.compatibility/CMakeLists.txt index 9782b9edf..ba9d5e126 100644 --- a/test.compatibility/CMakeLists.txt +++ b/test.compatibility/CMakeLists.txt @@ -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) diff --git a/test.models/CMakeLists.txt b/test.models/CMakeLists.txt index c34813269..32b7cbbc1 100644 --- a/test.models/CMakeLists.txt +++ b/test.models/CMakeLists.txt @@ -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)