2 # Copyright (C) 2006-2016 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 "${GEOM_ROOT_DIR}" && test -d ${GEOM_ROOT_DIR}; then
23 sed -i s%\"GEOM_ROOT_DIR\"%\"${GEOM_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
25 if test -n "${PYHELLO_ROOT_DIR}" && test -d ${PYHELLO_ROOT_DIR}; then
26 sed -i s%\"PYHELLO_ROOT_DIR\"%\"${PYHELLO_ROOT_DIR}\"% @CMAKE_CURRENT_BINARY_DIR@/config_appli.xml
30 if test -f @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py ; then
32 # --- create a SALOME Application environment
34 @KERNEL_ROOT_DIR@/bin/salome/appli_gen.py
35 sed -i s/\"yes\"/\"no\"/ SalomeApp.xml
36 sed -i s/\,study\,cppContainer\,registry\,moduleCatalog// SalomeApp.xml
37 sed -i s/pyContainer/pyContainer\,study\,cppContainer\,registry\,moduleCatalog/ SalomeApp.xml
39 cat > CatalogResources.xml << EOF
40 <!DOCTYPE ResourcesCatalog>
42 <machine hostname="localhost" />
46 # ---------------------------------------------------------------------------
47 # --- first set of test in C++
49 # --- launch in background a SALOME session (servers)
51 ln -fs @CMAKE_SOURCE_DIR@/src/yacsloader/samples .
52 ./salome > log1 2>&1 &
54 # --- wait a little to let the background process define
55 # the CORBA naming service port and host
59 # --- execute the test script in SALOME session environment
61 chmod +x @CMAKE_CURRENT_BINARY_DIR@/PmmlInSessionTest.sh
62 ./salome shell @CMAKE_CURRENT_BINARY_DIR@/PmmlInSessionTest.sh
65 # ---------------------------------------------------------------------------
67 kill -9 `cat "/tmp/YACSTEST_PidEcho"`
68 ./salome shell python killSalome.py
70 echo "exec status PmmlInSessionTest.sh " $ret
72 # --- delete all the SALOME Application environment
74 ./bin/salome/appli_clean.sh -f
78 ln -fs @CMAKE_SOURCE_DIR@/src/yacsloader/samples .
79 chmod +x @CMAKE_CURRENT_BINARY_DIR@/PmmlInSessionTest.sh
80 @CMAKE_CURRENT_BINARY_DIR@/PmmlInSessionTest.sh
82 echo "exec status PmmlInSessionTest.sh " $ret
87 then cat /tmp/${USER}/UnitTestsResult
88 else echo "Results are in /tmp/${USER}/UnitTestsResult"