From a4642653231c40ce06bdad4f15a497959480530c Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 18 Nov 2019 14:42:16 +0300 Subject: [PATCH] Fix the test environment to use the actual version of Python scripts of SHAPER instead of distributed with SALOME. --- env_linux.sh | 6 ++++-- test.sh | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/env_linux.sh b/env_linux.sh index d6cf38269..5dbe200ba 100644 --- a/env_linux.sh +++ b/env_linux.sh @@ -24,6 +24,8 @@ export PATH=${CPPLINT_ROOT_DIR}:${PATH} ## #------ SHAPER ------ -export PATH=${SHAPER_ROOT_DIR}/bin/salome:${PATH} -export PYTHONPATH=${SHAPER_ROOT_DIR}/bin/salome:${SHAPER_ROOT_DIR}/lib/python3.6/site-packages/salome:${PYTHONPATH} +export SHAPER_BIN_DIR=${SHAPER_ROOT_DIR}/bin/salome +export SHAPER_PYTHON_SCRIPTS_DIR=${SHAPER_ROOT_DIR}/lib/python3.6/site-packages/salome +export PATH=${SHAPER_BIN_DIR}:${PATH} +export PYTHONPATH=${SHAPER_BIN_DIR}:${SHAPER_PYTHON_SCRIPTS_DIR}:${PYTHONPATH} export LD_LIBRARY_PATH=${SHAPER_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} diff --git a/test.sh b/test.sh index 92c0b48e9..7faf456b8 100755 --- a/test.sh +++ b/test.sh @@ -7,6 +7,13 @@ cd ${BUILD_DIR} export DISPLAY="localhost:0.0" +# check for __init__.py in the SHAPER's Python scripts directory +# for correct parsing PYTHONPATH and use the actual version of SHAPER +# instead of distributed with SALOME +if [[ ! -f ${SHAPER_PYTHON_SCRIPTS_DIR}/salome/__init__.py ]]; then + touch ${SHAPER_PYTHON_SCRIPTS_DIR}/salome/__init__.py +fi + if [[ $# > 0 ]]; then ctest --no-compress-output -T Test "$@" -R $1 else -- 2.39.2