Salome HOME
Use SALOME V7.7.0
[modules/shaper.git] / salome_run.sh
index 5ef39f4abd64642495e48aeb6b3f9b67ed30985c..ce82805fa075cd3a18179f9322f5be290bfca2b7 100755 (executable)
@@ -1,12 +1,24 @@
-#!/bin/sh
+#!/bin/bash
 
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+source env.sh
+source ${TOOLS_DIR}/env_salome.sh
 
-source ${ROOT_DIR}/sources/linux_env.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 
 
-# Correcting path which defined with error
-export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-export LightAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+SALOME_ARGS=""
+SALOME_ARGS="${SALOME_ARGS} -r ./test.squish/shared/testdata/SalomeApp.xml"
+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}
+pkill -f "omniNames -start ${SALOME_PORT}"
 
-SUITApp LightApp --modules=NewGeom
\ No newline at end of file