X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_run.sh;h=dcbb707ceb93079b9d4aaabce511c874d0bc2731;hb=bd1b8c8100e2b2cffd30ee0b4d73836b13d518ae;hp=9844a1a3812f1664ffb087ee0536ca6b7ef6ccc8;hpb=92f6e0e6956953985182e6181d3e8acffa845755;p=modules%2Fshaper.git diff --git a/salome_run.sh b/salome_run.sh index 9844a1a38..dcbb707ce 100755 --- a/salome_run.sh +++ b/salome_run.sh @@ -1,16 +1,27 @@ -#!/bin/bash -ex +#!/bin/bash -cd $(dirname $0) +source env.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 -if [ "$#" = 1 ]; then - export SALOME_PORT="$1" -elif [ -z ${SALOME_PORT} ]; then - export SALOME_PORT=2900 +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" -source env.sh -source env_salome.sh +${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} +#pkill -f "omniNames -start ${SALOME_PORT}" -${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT} -${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --port=${SALOME_PORT} -r ./test.squish/shared/testdata/SalomeApp.xml -${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT}