diff tests/test-blackbox.t @ 19229:41e39a0299cb stable

blackbox: fix recording exit codes (issue3938) Previously the blackbox wrapped runcommand, but this failed to see the error codes that were created if an exception occurred. I moved that logging to now wrap _runcatch, so it can observe and log the actual error code (such as when a user ctrl+c's during a command). Updated the tests as well. Tested the change by running all the tests with the blackbox extension enabled and verifying nothing broke (aside from things that printed what extensions were enabeld). The progress tests are affected by calls to time.time() so they needed to be updated to pass.
author Durham Goode <durham@fb.com>
date Wed, 22 May 2013 17:31:47 -0700
parents 63dda3c3bb11
children e54a078153f7
line wrap: on
line diff
--- a/tests/test-blackbox.t	Tue May 21 15:31:56 2013 -0500
+++ b/tests/test-blackbox.t	Wed May 22 17:31:47 2013 -0700
@@ -26,7 +26,7 @@
   $ hg add a
   $ hg blackbox
   1970/01/01 00:00:00 bob> add a
-  1970/01/01 00:00:00 bob> add exited 0 after * seconds (glob)
+  1970/01/01 00:00:00 bob> add a exited 0 after * seconds (glob)
 
 incoming change tracking
 
@@ -58,7 +58,7 @@
   $ hg blackbox -l 3
   1970/01/01 00:00:00 bob> pull
   1970/01/01 00:00:00 bob> 1 incoming changes - new heads: d02f48003e62
-  1970/01/01 00:00:00 bob> pull exited None after * seconds (glob)
+  1970/01/01 00:00:00 bob> pull exited 0 after * seconds (glob)
 
 we must not cause a failure if we cannot write to the log
 
@@ -118,7 +118,7 @@
   $ hg blackbox -l 3
   1970/01/01 00:00:00 bob> strip tip
   1970/01/01 00:00:00 bob> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
-  1970/01/01 00:00:00 bob> strip exited 0 after * seconds (glob)
+  1970/01/01 00:00:00 bob> strip tip exited 0 after * seconds (glob)
 
 extension and python hooks - use the eol extension for a pythonhook
 
@@ -133,7 +133,7 @@
   1970/01/01 00:00:00 bob> update
   1970/01/01 00:00:00 bob> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
   1970/01/01 00:00:00 bob> exthook-update: echo hooked finished in * seconds (glob)
-  1970/01/01 00:00:00 bob> update exited False after * seconds (glob)
+  1970/01/01 00:00:00 bob> update exited 0 after * seconds (glob)
 
 log rotation