Salome HOME
CMake: Update path and version variables for current build system
[modules/yacs.git] / src / yacsloader_swig / Test / YacsLoaderInSessionTest.sh.in
1 #!/bin/bash
2 # Copyright (C) 2006-2013  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # --- script to execute in SALOME environment (use runSession)
22
23 # --- launch CORBA server echoSrv for tests (reuse the yacsloader/Test one)
24
25 ../../yacsloader/Test/echoSrv &
26 pidecho=$!
27 echo $pidecho > "/tmp/YACSTEST_PidEcho"
28
29 python @CMAKE_SOURCE_DIR@/src/yacsloader/Test/waitContainers.py
30
31 # --- launch unit tests
32
33 export ROOT_SAMPLES=@CMAKE_SOURCE_DIR@/src/yacsloader/samples
34 export TESTCOMPONENT_ROOT_DIR=@CMAKE_BINARY_DIR@/src/runtime/Test
35
36 export PYTHONPATH=..:../.libs:@CMAKE_SOURCE_DIR@/src/yacsloader_swig:${PYTHONPATH}
37 export PYTHONPATH=../../runtime_swig:../../runtime_swig/.libs:@CMAKE_SOURCE_DIR@/src/runtime_swig:${PYTHONPATH}
38 export PYTHONPATH=../../engine_swig:../../engine_swig/.libs:@CMAKE_SOURCE_DIR@/src/engine_swig:${PYTHONPATH}
39 export PYTHONPATH=../../yacsloader/Test:${PYTHONPATH}
40
41 python  @CMAKE_CURRENT_SOURCE_DIR@/testExec.py
42 ret0=$?
43 if [ $ret0 -gt 0 ]; then
44   echo "exec status testExec : " $ret0
45   exit $ret0
46 fi
47
48 python  @CMAKE_CURRENT_SOURCE_DIR@/testResume.py
49 ret1=$?
50 if [ $ret1 -gt 0 ]; then
51   echo "exec status testResume : " $ret1
52   exit $ret1
53 fi
54
55 python  @CMAKE_CURRENT_SOURCE_DIR@/testLoader.py
56 ret2=$?
57 if [ $ret2 -gt 0 ]; then
58   echo "exec status testLoader : " $ret2
59   exit $ret2
60 fi
61
62 python  @CMAKE_CURRENT_SOURCE_DIR@/testEdit.py
63 ret3=$?
64 if [ $ret3 -gt 0 ]; then
65   echo "exec status testEdit : " $ret3
66   exit $ret3
67 fi
68
69 python  @CMAKE_CURRENT_SOURCE_DIR@/testSave.py
70 ret4=$?
71 if [ $ret4 -gt 0 ]; then
72   echo "exec status testSave : " $ret4
73   exit $ret4
74 fi
75
76 python  @CMAKE_CURRENT_SOURCE_DIR@/testRefcount.py
77 ret5=$?
78 if [ $ret5 -gt 0 ]; then
79   echo "exec status testRefcount : " $ret5
80   exit $ret5
81 fi
82
83 let ret=$ret0+$ret1+$ret2+$ret3+$ret4+$ret5
84
85 # --- return unit tests status
86
87 exit $ret