X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_run.sh;h=b7bda749c976193d30730934195965336707fea1;hb=54be9b4cb34b76e64da83faff84f04880a37537d;hp=9a3fcdbd07eeb8ca46d00c1d43c38b94db6d51f8;hpb=fa892fb85e461d38293dedbd9ab65e2b522e1d3b;p=modules%2Fshaper.git diff --git a/salome_run.sh b/salome_run.sh index 9a3fcdbd0..b7bda749c 100755 --- a/salome_run.sh +++ b/salome_run.sh @@ -1,34 +1,24 @@ -#!/bin/bash -e +#!/bin/bash -a_dir=$(dirname $0) +source env.sh +source ${TOOLS_DIR}/env_salome.sh -cd ${a_dir} +# 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 -#fi - -echo "Run SALOME on port ${SALOME_PORT}" - -source ${a_dir}/env.sh -source ${a_dir}/env_salome.sh - -set -x +e - -SALOME_ARGS="-r ./test.squish/shared/testdata/SalomeApp.xml" -#SALOME_ARGS="${SALOME_ARGS} --port=${SALOME_PORT}" -if [ -f GDB ]; then - echo "No --gdb-session" - #SALOME_ARGS="${SALOME_ARGS} --gdb-session" -fi +SALOME_ARGS="" +SALOME_ARGS="${SALOME_ARGS} -r ${SOURCES_DIR}/test.squish/shared/testdata/SalomeApp.xml" SALOME_ARGS="${SALOME_ARGS} --ns-port-log=$(pwd)/.salomeport" -${KERNEL_ROOT_DIR}/bin/salome/runSalome.py ${SALOME_ARGS} 2>&1 >/dev/null & -SALOME_PID=$! -wait ${SALOME_PID} - -echo "SALOME_PORT=$(cat $(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} +pkill -f "omniNames -start ${SALOME_PORT}" +