You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2014/03/26 19:17:59 UTC

svn commit: r1581980 - in /qpid/proton/trunk/tests/python/proton_tests: common.py soak.py

Author: kgiusti
Date: Wed Mar 26 18:17:58 2014
New Revision: 1581980

URL: http://svn.apache.org/r1581980
Log:
NO-JIRA: add extra debug output on test failures

Modified:
    qpid/proton/trunk/tests/python/proton_tests/common.py
    qpid/proton/trunk/tests/python/proton_tests/soak.py

Modified: qpid/proton/trunk/tests/python/proton_tests/common.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/common.py?rev=1581980&r1=1581979&r2=1581980&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/common.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/common.py Wed Mar 26 18:17:58 2014
@@ -333,6 +333,7 @@ class MessengerApp(object):
         self.certificate = None
         self.privatekey = None
         self.password = None
+        self._output = None
 
     def start(self, verbose=False):
         """ Begin executing the test """
@@ -363,8 +364,15 @@ class MessengerApp(object):
 
     def stdout(self):
         #self._process.communicate()[0]
+        if not self._output or not self._output[0]:
+            return "*** NO STDOUT ***"
         return self._output[0]
 
+    def stderr(self):
+        if not self._output or not self._output[1]:
+            return "*** NO STDERR ***"
+        return self._output[1]
+
     def cmdline(self):
         if not self._cmdline:
             self._build_command()

Modified: qpid/proton/trunk/tests/python/proton_tests/soak.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/soak.py?rev=1581980&r1=1581979&r2=1581980&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/soak.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/soak.py Wed Mar 26 18:17:58 2014
@@ -94,13 +94,21 @@ class AppTests(Test):
                 S.wait()
                 #print("SENDER OUTPUT:")
                 #print( S.stdout() )
-                assert S.status() == 0, "Command '%s' failed" % str(S.cmdline())
+                assert S.status() == 0, ("Command '%s' failed status=%d: '%s' '%s'"
+                                         % (str(S.cmdline()),
+                                            S.status(),
+                                            S.stdout(),
+                                            S.stderr()))
 
         for R in self.receivers:
             R.wait()
             #print("RECEIVER OUTPUT")
             #print( R.stdout() )
-            assert R.status() == 0, "Command '%s' failed" % str(R.cmdline())
+            assert R.status() == 0, ("Command '%s' failed status=%d: '%s' '%s'"
+                                     % (str(R.cmdline()),
+                                        R.status(),
+                                        R.stdout(),
+                                        R.stderr()))
 
 #
 # Traffic passing tests based on the Messenger apps



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org