From 2dd75e4dc2ae0ed886f21db6122230e03d8a3e97 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 25 Mar 2019 13:09:04 +0300 Subject: [PATCH] Launch restricted models tests if repository is accessible. --- test.compatibility/CMakeLists.txt | 8 +++++++- test.models/CMakeLists.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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) -- 2.39.2