Salome HOME
Synchronize adm files
[modules/yacs.git] / src / yacsloader_swig / Test / YacsLoaderInSessionTest.sh.in
1 #!/bin/bash
2 # Copyright (C) 2006-2014  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, or (at your option) any later version.
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=@CMAKE_BINARY_DIR@/src/yacsloader_swig:$PYTHONPATH
37 export PYTHONPATH=@CMAKE_BINARY_DIR@/src/runtime_swig:$PYTHONPATH
38 export PYTHONPATH=@CMAKE_BINARY_DIR@/src/engine_swig:$PYTHONPATH
39 export PYTHONPATH=@CMAKE_CURRENT_SOURCE_DIR@:$PYTHONPATH
40 export PYTHONPATH=@CMAKE_SOURCE_DIR@/src/yacsloader/Test:$PYTHONPATH
41
42 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testExec.py
43 python  @CMAKE_CURRENT_SOURCE_DIR@/testExec.py
44 ret0=$?
45 if [ $ret0 -gt 0 ]; then
46   echo "exec status testExec : " $ret0
47   exit $ret0
48 fi
49
50 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testResume.py
51 python  @CMAKE_CURRENT_SOURCE_DIR@/testResume.py
52 ret1=$?
53 if [ $ret1 -gt 0 ]; then
54   echo "exec status testResume : " $ret1
55   exit $ret1
56 fi
57
58 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testLoader.py
59 python  @CMAKE_CURRENT_SOURCE_DIR@/testLoader.py
60 ret2=$?
61 if [ $ret2 -gt 0 ]; then
62   echo "exec status testLoader : " $ret2
63   exit $ret2
64 fi
65
66 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testEdit.py
67 python  @CMAKE_CURRENT_SOURCE_DIR@/testEdit.py
68 ret3=$?
69 if [ $ret3 -gt 0 ]; then
70   echo "exec status testEdit : " $ret3
71   exit $ret3
72 fi
73
74 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testSave.py
75 python  @CMAKE_CURRENT_SOURCE_DIR@/testSave.py
76 ret4=$?
77 if [ $ret4 -gt 0 ]; then
78   echo "exec status testSave : " $ret4
79   exit $ret4
80 fi
81
82 chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testRefcount.py
83 python  @CMAKE_CURRENT_SOURCE_DIR@/testRefcount.py
84 ret5=$?
85 if [ $ret5 -gt 0 ]; then
86   echo "exec status testRefcount : " $ret5
87   exit $ret5
88 fi
89
90 let ret=$ret0+$ret1+$ret2+$ret3+$ret4+$ret5
91
92 # --- return unit tests status
93
94 exit $ret