X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_run.sh;h=dcbb707ceb93079b9d4aaabce511c874d0bc2731;hb=7827e9e8c2cdcd807c44c933b770e26493938e55;hp=98e3959fb2d8a67bba64341547796d6fc45454d0;hpb=3cfafe688b16dfa75d44fd5f26947f9ee46b85a6;p=modules%2Fshaper.git diff --git a/salome_run.sh b/salome_run.sh index 98e3959fb..dcbb707ce 100755 --- a/salome_run.sh +++ b/salome_run.sh @@ -1,34 +1,27 @@ -#!/bin/bash -e +#!/bin/bash -a_dir=$(dirname $0) +source env.sh -cd ${a_dir} +${TOOLS_DIR}/solver.sh "$@" -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 +# 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="-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" +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} 2>&1 >/dev/null & -SALOME_PID=$! -wait ${SALOME_PID} +${KERNEL_ROOT_DIR}/bin/salome/runSalome.py ${SALOME_ARGS} >log_runSalome 2>err_runSalome -echo "SALOME_PORT=$(cat $(pwd)/.salomeport)" +#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}