2 # Copyright (C) 2006-2012 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
24 # --- top_builddir is used in make check
25 # --- top_srcdir is used in make distcheck
27 sys.path.insert(0,"@srcdir@")
28 sys.path.insert(0,"@top_builddir@/src/engine_swig")
29 sys.path.insert(0,"@top_builddir@/src/runtime_swig")
30 sys.path.insert(0,"@top_builddir@/src/engine_swig/.libs")
31 sys.path.insert(0,"@top_builddir@/src/runtime_swig/.libs")
32 sys.path.insert(0,"@top_srcdir@/src/engine_swig")
33 sys.path.insert(0,"@top_srcdir@/src/runtime_swig")
40 class TestSalomeLoader(unittest.TestCase):
42 SALOMERuntime.RuntimeSALOME_setRuntime()
43 self.loader=salomeloader.SalomeLoader()
46 """test GeomGraph.xml"""
47 p= self.loader.load(os.path.join("@srcdir@","samples","GeomGraph.xml"))
48 p.saveSchema("tata.xml")
51 """test GeomGraphGates_py.xml"""
52 p= self.loader.load(os.path.join("@srcdir@","samples","GeomGraphGates_py.xml"))
53 p.saveSchema("tata.xml")
56 """test GeomGraphGates.xml"""
57 p= self.loader.load(os.path.join("@srcdir@","samples","GeomGraphGates.xml"))
58 p.saveSchema("tata.xml")
61 """test GeomGraph_py.xml"""
62 p= self.loader.load(os.path.join("@srcdir@","samples","GeomGraph_py.xml"))
63 p.saveSchema("tata.xml")
66 """test Graph_couronne.xml"""
67 p= self.loader.load(os.path.join("@srcdir@","samples","Graph_couronne.xml"))
68 p.saveSchema("tata.xml")
71 """test testvisu20.xml"""
72 p= self.loader.load(os.path.join("@srcdir@","samples","testvisu20.xml"))
73 p.saveSchema("tata.xml")
76 f=open("/tmp/" + U + "/UnitTestsResult", 'a')
77 f.write(" --- TEST src/salomeloader: testSalomeLoader.py\n")
78 suite = unittest.makeSuite(TestSalomeLoader)
79 result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
81 sys.exit(not result.wasSuccessful())