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