2 # Copyright (C) 2006-2015 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, or (at your option) any later version.
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 @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml; then
22 if test -n "${PYHELLO_ROOT_DIR}" && test -d ${PYHELLO_ROOT_DIR}; then
23 sed -i s%\"PYHELLO_ROOT_DIR\"%\"${PYHELLO_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
27 if test -f @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py ; then
29 # --- create a SALOME Application environment
31 @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py
32 sed -i s/\"yes\"/\"no\"/ SalomeApp.xml
33 sed -i s/\,study\,cppContainer\,registry\,moduleCatalog// SalomeApp.xml
34 sed -i s/pyContainer/pyContainer\,study\,cppContainer\,registry\,moduleCatalog/ SalomeApp.xml
36 cat > CatalogResources.xml << EOF
37 <!DOCTYPE ResourcesCatalog>
39 <machine hostname="localhost" />
43 # ---------------------------------------------------------------------------
44 # --- first set of test in C++
46 # --- launch in background a SALOME session (servers)
48 ln -fs @CMAKE_SOURCE_DIR@/src/yacsloader/samples .
49 ./salome > log1 2>&1 &
51 # --- wait a little to let the background process define
52 # the CORBA naming service port and host
56 # --- execute the test script in SALOME session environment
58 chmod +x @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
59 ./salome shell @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
62 # ---------------------------------------------------------------------------
64 kill -9 `cat "/tmp/YACSTEST_PidEcho"`
65 ./salome shell python killSalome.py
67 echo "exec status YacsLoaderInSessionTest.sh " $ret
69 # --- delete all the SALOME Application environment
71 ./bin/salome/appli_clean.sh -f
75 ln -fs @CMAKE_SOURCE_DIR@/src/yacsloader/samples .
76 chmod +x @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
77 @CMAKE_CURRENT_BINARY_DIR@/YacsLoaderInSessionTest.sh
79 echo "exec status YacsLoaderInSessionTest.sh " $ret
84 then cat /tmp/${USER}/UnitTestsResult
85 else echo "Results are in /tmp/${USER}/UnitTestsResult"