]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix the test environment to use the actual version of Python scripts of SHAPER instea...
authorazv <azv@opencascade.com>
Mon, 18 Nov 2019 11:42:16 +0000 (14:42 +0300)
committerazv <azv@opencascade.com>
Mon, 18 Nov 2019 11:42:16 +0000 (14:42 +0300)
env_linux.sh
test.sh

index d6cf38269b8046626dac346450c1e0ec19024966..5dbe200badf9cb7222a9a2038d16023e3f790d04 100644 (file)
@@ -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 92c0b48e9651a0b4d16e12a6f178499fbe08164a..7faf456b873ec3f33bcbb5ba2aafa9d7ed94797d 100755 (executable)
--- 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