Salome HOME
Merge from V6_main 01/04/2013
[modules/smesh.git] / src / Tools / padder / spadderpy / configreader.py
index ceacf543fbef327d28ed10e838eb9ef8466d2dc4..b79e4f73d175f06819929d03df4290c507e52b94 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2012  EDF R&D
+# Copyright (C) 2011-2013  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
@@ -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
 
 #
 # =========================================================================