[Neo-report] r2538 vincent - /trunk/neo/tests/functional/__init__.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 14 16:57:10 CET 2010


Author: vincent
Date: Tue Dec 14 16:57:10 2010
New Revision: 2538

Log:
Raise when subprocess exited with an error status.

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 Dec 14 16:57:10 2010
@@ -41,6 +41,9 @@ NEO_ADMIN = 'neoadmin'
 DELAY_SAFETY_MARGIN = 10
 MAX_START_TIME = 30
 
+class NodeProcessError(Exception):
+    pass
+
 class AlreadyRunning(Exception):
     pass
 
@@ -117,6 +120,9 @@ class NEOProcess(object):
             raise AlreadyStopped
         result = os.WEXITSTATUS(os.waitpid(self.pid, options)[1])
         self.pid = 0
+        if result:
+            raise NodeProcessError('%r %r exited with status %r' % (
+                self.command, self.arg_dict, result))
         return result
 
     def stop(self):




More information about the Neo-report mailing list