X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_run.sh;h=8feb27cac881deaa6b8c23b1fcdf268edc6aeb81;hb=fc88c49ff45f48d63ff6067384e56eb146c4cbc0;hp=16c6caf0af1744bfd4042a7291578f8b1e1ad9c2;hpb=ae56a5ed7f640a944108b5aee567bb80ced86c9a;p=modules%2Fshaper.git diff --git a/salome_run.sh b/salome_run.sh index 16c6caf0a..8feb27cac 100755 --- a/salome_run.sh +++ b/salome_run.sh @@ -1,11 +1,28 @@ -#!/bin/bash -x - -export SALOME_PORT=2820 +#!/bin/bash source env.sh -source env_salome.sh +source ${TOOLS_DIR}/env_salome.sh +${TOOLS_DIR}/solver.sh "$@" + +# kill processes of previous SALOME run +if [ -f .salomeport ]; then + SALOME_PORT=$(cat .salomeport) + ${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT} + pkill -f "omniNames -start ${SALOME_PORT}" + rm .salomeport +fi + +SALOME_ARGS="" +if [[ "${SALOME_SQUISH_PREFS:-FALSE}" == "TRUE" ]]; then + SALOME_ARGS="${SALOME_ARGS} -r ${SOURCES_DIR}/test.squish/shared/testdata/SalomeApp.xml" +fi +SALOME_ARGS="${SALOME_ARGS} --ns-port-log=$(pwd)/.salomeport" + +${KERNEL_ROOT_DIR}/bin/salome/runSalome.py ${SALOME_ARGS} >log_runSalome 2>err_runSalome + +SALOME_PORT=$(cat .salomeport) +echo "Kill SALOME on port ${SALOME_PORT}" ${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT} -${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --port ${SALOME_PORT} -sleep 5 -${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT} +pkill -f "omniNames -start ${SALOME_PORT}" +