[Neo-report] r2617 olivier.cros - /trunk/neo/tests/functional/__init__.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 18 16:19:36 CET 2011
Author: olivier.cros
Date: Tue Jan 18 16:19:36 2011
New Revision: 2617
Log:
Search for neo commands in path
In order to find neo commands like neoadmin, neomaster, neostorage, ... in
the path of a buildout installation, we must set the path to commands
manually.
Modified:
trunk/neo/tests/functional/__init__.py
Modified: trunk/neo/tests/functional/__init__.py
==============================================================================
--- trunk/neo/tests/functional/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/__init__.py [iso-8859-1] Tue Jan 18 16:19:36 2011
@@ -50,11 +50,24 @@ class AlreadyRunning(Exception):
class AlreadyStopped(Exception):
pass
+class NotFound(Exception):
+ pass
+
class NEOProcess(object):
pid = 0
def __init__(self, command, uuid, arg_dict):
- self.command = command
+ path = os.getenv('PATH')
+ split_path = path.split(":")
+
+ for elt_path in split_path:
+ command = "%s/%s" % (elt_path, command)
+ if os.path.exists(command):
+ self.command = command
+ break
+ else:
+ raise NotFound, '%s not found' % (command)
+
self.arg_dict = arg_dict
self.with_uuid = True
self.setUUID(uuid)
More information about the Neo-report
mailing list