Salome HOME
Update SQUISH tests
[modules/shaper.git] / test_squish.sh
1 #!/bin/bash -x
2
3 set -e
4
5 if [ "$#" = 1 ]; then
6   SQUISHSERVER_PORT=$1
7 elif [ -z ${SQUISHSERVER_PORT} ]; then
8   SQUISHSERVER_PORT=4320
9 fi
10
11 source env_squish.sh
12
13 for aut in linux_run.sh salome_run.sh; do
14   squishserver --config addAUT ${aut} $(pwd)
15 done
16 squishserver --config setAUTTimeout 60
17 squishserver --verbose --port=${SQUISHSERVER_PORT} --stop
18 squishserver --verbose --port=${SQUISHSERVER_PORT} --daemon
19
20 RETVAL=0
21 for suite in ./test.squish/suite_*
22 do
23   set +e
24   squishrunner --port=${SQUISHSERVER_PORT} --testsuite ${suite} --reportgen stdout --exitCodeOnFail 1
25   EXIT_CODE=$?
26   set -e
27   if [ ${EXIT_CODE} = '1' ]; then RETVAL=1; fi
28 done
29
30 squishserver --verbose --port=${SQUISHSERVER_PORT} --stop
31 for aut in linux_run.sh salome_run.sh; do
32   squishserver --config removeAUT ${aut} $(pwd)
33 done
34
35 exit ${RETVAL}