Salome HOME
Update copyrights 2014.
[modules/smesh.git] / src / Tools / padder / spadderpy / configreader.py
index ceacf543fbef327d28ed10e838eb9ef8466d2dc4..02e5188f7207ea17dabbbac38e7b9968b93c5ff6 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2012  EDF R&D
+# Copyright (C) 2011-2014  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,6 +17,7 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Author(s): Guillaume Boulant (23/03/2011)
 #
 
@@ -85,13 +86,22 @@ class ConfigReader:
             return TYPE_LOCAL
         return defaultType
 
-
 def printConfig(config):
     print "PADDER CONFIGURATION:"
     print "\tconfig.resname = %s"%config.resname
     print "\tconfig.binpath = %s"%config.binpath
     print "\tconfig.envpath = %s"%config.envpath
     
+def getPadderTestDir(config):
+    """
+    This function returns the directory of the SpherePadder
+    installation, where the tests cases are located. This should be
+    used for test only. It makes the hypothesis that the binpath to
+    the executable program is a path of the executable program of a
+    complete installation of SpherePadder.
+    """
+    testdir=os.path.join(os.path.abspath(os.path.dirname(config.binpath)),"tests")
+    return testdir
 
 #
 # =========================================================================