-#!/bin/bash -ex
+#!/bin/bash -e
-cd $(dirname $0)
+a_dir=$(dirname $0)
if [ "$#" = 1 ]; then
export SALOME_PORT="$1"
export SALOME_PORT=2900
fi
-source env.sh
-source env_salome.sh
+echo "Run SALOME on port ${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}
+source ${a_dir}/env.sh
+source ${a_dir}/env_salome.sh
+
+set -x +e
+
+${a_dir}/salome_kill.sh
+
+${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --port=${SALOME_PORT} -r ./test.squish/shared/testdata/SalomeApp.xml 2>&1 >/dev/null