]> SALOME platform Git repositories - modules/shaper.git/blob - test_squish.sh
Salome HOME
Delegate to KERNEL salome module the Session Status
[modules/shaper.git] / test_squish.sh
1 #!/bin/bash
2
3 # This sctipt uses:
4 # SOURCES_DIR - where test.squish is placed
5 # AUT_DIR - where linux_run.sh, salome_run.sh are placed
6 # SQUISH_PORT - the port for squishserver
7 # PATH - should contain squishserver, squishrunner
8
9 export TEST_DATA_DIR=${SOURCES_DIR}/test.squish/shared/testdata
10 export SQUISH_GRABWINDOW_CLASSES=AppElements_ViewPort,OCCViewer_ViewPort3d
11
12 SERVEROPTIONS_ARGS="${SERVEROPTIONS_ARGS} --port=${SQUISH_PORT}"
13
14 # config squishserver
15 for aut in linux_run.sh salome_run.sh; do
16   squishserver --config addAUT ${aut} ${AUT_DIR}
17 done
18 squishserver --config setAUTTimeout 120
19 # stop previous version
20 squishserver ${SERVEROPTIONS_ARGS} --verbose --stop >/dev/null 2>&1
21 # start squishserver
22 squishserver ${SERVEROPTIONS_ARGS} --verbose 1>log_squishserver 2>err_squishserver &
23
24 # config squishrunner
25 squishrunner --port=${SQUISH_PORT} --config setCursorAnimation off
26 # start squishrunner
27
28 RETVAL=0
29
30 squishrunner-run() {
31   local TESTSUITE=$1
32   local TESTCASES="$2"
33
34   local SQUISHRUNNER_ARGS=""
35   SQUISHRUNNER_ARGS="${SQUISHRUNNER_ARGS} --testsuite ${SOURCES_DIR}/test.squish/${TESTSUITE}"
36   SQUISHRUNNER_ARGS="${SQUISHRUNNER_ARGS} --resultdir ${SOURCES_DIR}/test.squish_results/${TESTSUITE}"
37   SQUISHRUNNER_ARGS="${SQUISHRUNNER_ARGS} --reportgen xmljunit,${SOURCES_DIR}/test.squish_results/${TESTSUITE}_results.xml"
38   SQUISHRUNNER_ARGS="${SQUISHRUNNER_ARGS} ${TESTCASES}"
39   SQUISHRUNNER_ARGS="${SQUISHRUNNER_ARGS} --exitCodeOnFail 1"
40   squishrunner ${SERVEROPTIONS_ARGS} ${SQUISHRUNNER_ARGS}
41   EXIT_CODE=$?
42   if [ ${EXIT_CODE} = '1' ]; then RETVAL=1; fi
43 }
44
45 TESTCASES=""
46 TESTCASES="${TESTCASES} --testcase tst_BASE"
47 TESTCASES="${TESTCASES} --testcase tst_PARALLEL_1"
48 TESTCASES="${TESTCASES} --testcase tst_PARALLEL_2"
49 TESTCASES="${TESTCASES} --testcase tst_PERPENDICULAR_1"
50 #TESTCASES="${TESTCASES} --testcase tst_532"
51 TESTCASES="${TESTCASES} --testcase tst_818"
52 TESTCASES="${TESTCASES} --testcase tst_c"
53 TESTCASES="${TESTCASES} --testcase tst_common_1"
54 TESTCASES="${TESTCASES} --testcase tst_crash_1"
55 TESTCASES="${TESTCASES} --testcase tst_DISTANCE"
56 TESTCASES="${TESTCASES} --testcase tst_RADIUS"
57 #squishrunner-run suite_STANDALONE "${TESTCASES}"
58
59 TESTCASES=""
60 TESTCASES="${TESTCASES} --testcase tst_679"
61 squishrunner-run suite_ERROR_NOTIFICATION "${TESTCASES}"
62
63 TESTCASES=""
64 TESTCASES="${TESTCASES} --testcase tst_ACTIVE_DOC_MANAGEMENT"
65 squishrunner-run suite_OBJECT_BROWSER "${TESTCASES}"
66
67 TESTCASES=""
68 TESTCASES="${TESTCASES} --testcase tst_474"
69 TESTCASES="${TESTCASES} --testcase tst_576"
70 TESTCASES="${TESTCASES} --testcase tst_903"
71 squishrunner-run suite_FEATURE_PARAMETERS "${TESTCASES}"
72
73 TESTCASES=""
74 #TESTCASES="${TESTCASES} --testcase tst_532"
75 #squishrunner-run suite_ISSUES_SALOME "${TESTCASES}"
76
77 TESTCASES=""
78 TESTCASES="${TESTCASES} --testcase tst_boolean_001"
79 TESTCASES="${TESTCASES} --testcase tst_boolean_002"
80 TESTCASES="${TESTCASES} --testcase tst_boolean_003"
81 squishrunner-run suite_FEATURE_BOOLEAN "${TESTCASES}"
82
83 TESTCASES=""
84 TESTCASES="${TESTCASES} --testcase tst_construction_001"
85 squishrunner-run suite_FEATURE_CONSTRUCTION "${TESTCASES}"
86
87 TESTCASES=""
88 TESTCASES="${TESTCASES} --testcase tst_extrusion_001"
89 TESTCASES="${TESTCASES} --testcase tst_extrusion_002"
90 TESTCASES="${TESTCASES} --testcase tst_extrusion_003"
91 TESTCASES="${TESTCASES} --testcase tst_extrusion_004"
92 TESTCASES="${TESTCASES} --testcase tst_extrusion_006"
93 squishrunner-run suite_FEATURE_EXTRUSION "${TESTCASES}"
94
95 TESTCASES=""
96 TESTCASES="${TESTCASES} --testcase tst_partition_001"
97 squishrunner-run suite_FEATURE_PARTITION "${TESTCASES}"
98
99 TESTCASES=""
100 TESTCASES="${TESTCASES} --testcase tst_revolution_001"
101 TESTCASES="${TESTCASES} --testcase tst_revolution_003"
102 TESTCASES="${TESTCASES} --testcase tst_revolution_004"
103 TESTCASES="${TESTCASES} --testcase tst_revolution_005"
104 TESTCASES="${TESTCASES} --testcase tst_revolution_006"
105 squishrunner-run suite_FEATURE_REVOLUTION "${TESTCASES}"
106
107 TESTCASES=""
108 #TESTCASES="${TESTCASES} --testcase tst_sketch_001"
109 #TESTCASES="${TESTCASES} --testcase tst_sketch_002"
110 #TESTCASES="${TESTCASES} --testcase tst_sketch_003"
111 #TESTCASES="${TESTCASES} --testcase tst_sketch_004"
112 #TESTCASES="${TESTCASES} --testcase tst_sketch_005"
113 #TESTCASES="${TESTCASES} --testcase tst_sketch_006"
114 #TESTCASES="${TESTCASES} --testcase tst_sketch_007"
115 #TESTCASES="${TESTCASES} --testcase tst_sketch_008"
116 #TESTCASES="${TESTCASES} --testcase tst_sketch_009"
117 #TESTCASES="${TESTCASES} --testcase tst_sketch_010"
118 #TESTCASES="${TESTCASES} --testcase tst_sketch_011"
119 #TESTCASES="${TESTCASES} --testcase tst_sketch_012"
120 #TESTCASES="${TESTCASES} --testcase tst_sketch_013"
121 #TESTCASES="${TESTCASES} --testcase tst_sketch_014"
122 #TESTCASES="${TESTCASES} --testcase tst_sketch_015"
123 #TESTCASES="${TESTCASES} --testcase tst_sketch_016"
124 #TESTCASES="${TESTCASES} --testcase tst_sketch_017"
125 #TESTCASES="${TESTCASES} --testcase tst_sketch_018"
126 #squishrunner-run suite_FEATURE_SKETCH "${TESTCASES}"
127
128 # stop squishserver
129 squishserver ${SERVEROPTIONS_ARGS} --verbose --stop
130 for aut in linux_run.sh salome_run.sh; do
131   squishserver --config removeAUT ${aut} ${AUT_DIR}
132 done
133
134 exit ${RETVAL}