Salome HOME
cda872e27456892a89b86c92b0d0672fb8eeb54e
[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} 2>server.err &
19
20 squishrunner --port=${SQUISHSERVER_PORT} --config setCursorAnimation off
21
22 RETVAL=0
23 for suite in ./test.squish/suite_*
24 do
25   set +e
26   squishrunner --port=${SQUISHSERVER_PORT} --testsuite ${suite} --reportgen stdout --exitCodeOnFail 1
27   EXIT_CODE=$?
28   set -e
29   if [ ${EXIT_CODE} = '1' ]; then RETVAL=1; fi
30 done
31
32 squishserver --verbose --port=${SQUISHSERVER_PORT} --stop
33 for aut in linux_run.sh salome_run.sh; do
34   squishserver --config removeAUT ${aut} $(pwd)
35 done
36
37 exit ${RETVAL}