2 # Copyright (C) 2006-2013 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 @CMAKE_SOURCE_DIR@/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 @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
53 ./runSession @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
56 # ---------------------------------------------------------------------------
58 kill -9 `cat "/tmp/YACSTEST_PidEcho"`
59 ./runSession killSalome.py
61 echo "exec status YacsLoaderInSessionTest.sh " $ret
63 # --- delete all the SALOME Application environment
65 ./bin/salome/appli_clean.sh -f
69 ln -fs @CMAKE_SOURCE_DIR@/src/yacsloader/samples .
70 chmod +x @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
71 @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
73 echo "exec status YacsLoaderInSessionTest.sh " $ret
78 then cat /tmp/${USER}/UnitTestsResult
79 else echo "Results are in /tmp/${USER}/UnitTestsResult"