Salome HOME
Attach GDB to SQUISH tests
[modules/shaper.git] / test_squish.sh
1 #!/bin/bash -x
2
3 a_dir=$(dirname $0)
4
5 set -e
6
7 if [ "$#" = 1 ]; then
8   SQUISHSERVER_PORT=$1
9 elif [ -z ${SQUISHSERVER_PORT} ]; then
10   SQUISHSERVER_PORT=4320
11 fi
12
13 export TEST_DATA_DIR=$(cd ${a_dir}; pwd)/test.squish/shared/testdata
14
15 source ${a_dir}/env_squish.sh
16
17 for aut in linux_run.sh salome_run.sh; do
18   squishserver --config addAUT ${aut} $(pwd)
19 done
20 squishserver --config setAUTTimeout 120
21 squishserver --verbose --port=${SQUISHSERVER_PORT} --stop
22 squishserver --verbose --port=${SQUISHSERVER_PORT} 2>server.err &
23
24 squishrunner --port=${SQUISHSERVER_PORT} --config setCursorAnimation off
25
26 RETVAL=0
27
28 squishrunner_run() {
29   local suite=$1
30   local tests=$2
31
32   set +x
33   local tests_arg=
34   for test in ${tests}; do
35     tests_arg="${tests_arg} --testcase ${test}"
36   done
37   set -x
38
39   set +e
40   squishrunner --port=${SQUISHSERVER_PORT} --testsuite ${suite} ${tests_arg} --reportgen stdout --exitCodeOnFail 1
41   EXIT_CODE=$?
42   set -e
43   if [ ${EXIT_CODE} = '1' ]; then RETVAL=1; fi
44 }
45
46 squishrunner_run ./test.squish/suite_ISSUES 'tst_BASE tst_DISTANCE tst_PARALLEL_1 tst_PARALLEL_2 tst_PERPENDICULAR_1 tst_RADIUS tst_c tst_common_1 tst_crash_1 tst_818 tst_532'
47 squishrunner_run ./test.squish/suite_ISSUES_SALOME 'tst_sketch_001 tst_sketch_002 tst_sketch_003 tst_sketch_004 tst_sketch_005 tst_sketch_006 tst_sketch_007 tst_sketch_008 tst_sketch_009 tst_sketch_010 tst_sketch_011 tst_474 tst_532 tst_576 tst_679'
48
49 squishserver --verbose --port=${SQUISHSERVER_PORT} --stop
50 for aut in linux_run.sh salome_run.sh; do
51   squishserver --config removeAUT ${aut} $(pwd)
52 done
53
54 exit ${RETVAL}