Salome HOME
Typo-fix by Kunda
[modules/kernel.git] / src / KERNEL_PY / kernel / kernelpy_autotest.sh.in
1 #!/bin/sh
2 # Copyright (C) 2010-2016  CEA/DEN, EDF R&D, OPEN CASCADE
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 # Author : Guillaume Boulant (EDF) 
21 #
22
23 #
24 # This script runs the unit tests embedded in each of the python
25 # modules of the package salome.kernel.
26 #
27 # This script should be executed in a SALOME shell session,
28 # for example the shell obtained from the command runSession
29 # provided by the SALOME application.
30 #
31
32 # This first list does not need a SALOME application. Only the
33 # environment is required (for example, run these script in a
34 # session obtained with runSession
35 listfiles="\
36     unittester.py \
37     enumerate.py \
38     uiexception.py \
39     datamodeler.py \
40     testdata.py \
41     diclookup.py \
42     syshelper.py \
43     pyunittester.py \
44     __init__.py"
45
46 # This files should be add to the list
47 #listfiles=$listfiles"\
48 #    deprecation.py \
49 #    logger.py \
50 #    termcolor.py \
51 #    logconfig.py"
52
53 # This list REQUIRES a running SALOME application
54 listfiles=$listfiles"\
55     services.py \
56     studyedit.py"
57
58 # This files are not used yet (but we test them)
59 #listfiles=$listfiles"\
60 #    salome/kernel/threadhelper.py"
61
62 MODULE_ROOT_DIR=@prefix@
63 MODULE_PYTHON_DIR=$MODULE_ROOT_DIR/lib/python@PYTHON_VERSION@/site-packages/salome
64 PYTHONPATH=$MODULE_PYTHON_DIR:$PYTHONPATH
65 export PYTHONPATH
66
67 here=$(pwd)
68 package_path="salome/kernel"
69 cd $MODULE_PYTHON_DIR
70 for file in $listfiles; do
71     # Uncomment this line (and comment the next one) to display
72     # the start line of a test and not only the result:
73     #python $package_path/$file | grep '^\[TEST'
74     python $package_path/$file | grep '^\[TEST' | grep -v 'test in progress'
75 done
76 cd $here