2 # Copyright (C) 2006-2008 CEA/DEN, EDF R&D
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.
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.
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
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 if test -f @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py ; then
23 # --- create a SALOME Application environment
25 @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py
26 sed -i s/\"yes\"/\"no\"/ SalomeApp.xml
27 sed -i s/\,study\,cppContainer\,registry\,moduleCatalog// SalomeApp.xml
28 sed -i s/pyContainer/pyContainer\,study\,cppContainer\,registry\,moduleCatalog/ SalomeApp.xml
30 cat > CatalogResources.xml << EOF
31 <!DOCTYPE ResourcesCatalog>
33 <machine hostname="localhost" />
37 # ---------------------------------------------------------------------------
38 # --- first set of test in C++
40 # --- launch in background a SALOME session (servers)
42 ln -fs @top_srcdir@/src/yacsloader/samples .
43 ./runAppli > log1 2>&1
45 # --- wait a little to let the background process define
46 # the CORBA naming service port and host
50 # --- execute the test script in SALOME session environment
52 chmod +x @builddir@/YacsLoaderInSessionTest.sh
53 ./runSession @builddir@/YacsLoaderInSessionTest.sh
56 # ---------------------------------------------------------------------------
57 # --- second set of tests: Python scripts
59 chmod +x @builddir@/YacsLoaderInSessionTest2.sh
60 ./runSession @builddir@/YacsLoaderInSessionTest2.sh
63 # ---------------------------------------------------------------------------
65 kill -9 `cat "/tmp/YACSTEST_PidEcho"`
66 ./runSession killSalome.py
68 echo "exec status YacsLoaderInSessionTest.sh " $ret1
69 echo "exec status YacsLoaderInSessionTest2.sh " $ret2
72 # --- delete all the SALOME Application environment
74 ./bin/salome/appli_clean.sh
78 ln -fs @top_srcdir@/src/yacsloader/samples .
79 chmod +x @builddir@/YacsLoaderInSessionTest.sh
80 @builddir@/YacsLoaderInSessionTest.sh
82 echo "exec status YacsLoaderInSessionTest.sh " $ret
87 then cat /tmp/${USER}/UnitTestsResult
88 else echo "Results are in /tmp/${USER}/UnitTestsResult"