changeset 20630:0b04ee8e789d

cmdserver: include non-zero return code of runcommand in test output
author Yuya Nishihara <yuya@tcha.org>
date Mon, 03 Mar 2014 15:50:48 +0900
parents 277dc5f27310
children 5d4606bec54c
files tests/test-commandserver.py tests/test-commandserver.py.out
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-commandserver.py	Mon Mar 03 19:41:30 2014 +0900
+++ b/tests/test-commandserver.py	Mon Mar 03 15:50:48 2014 +0900
@@ -51,7 +51,10 @@
         elif ch == 'L':
             writeblock(server, input.readline(data))
         elif ch == 'r':
-            return struct.unpack('>i', data)[0]
+            ret, = struct.unpack('>i', data)
+            if ret != 0:
+                print ' [%d]' % ret
+            return ret
         else:
             print "unexpected channel %c: %r" % (ch, data)
             if ch.isupper():
--- a/tests/test-commandserver.py.out	Mon Mar 03 19:41:30 2014 +0900
+++ b/tests/test-commandserver.py.out	Mon Mar 03 15:50:48 2014 +0900
@@ -142,6 +142,7 @@
 
  runcommand phase -r . -p
 no phases changed
+ [1]
  runcommand commit -Am.
  runcommand rollback
 repository tip rolled back to revision 3 (undo commit)