changeset 13918:55f4941f98c8

tests: better output on timeouts Formerly, timeouts would generate huge scrollback-destroying diffs and weird -15 return codes in the summary. Now we simply report "timed out".
author Matt Mackall <mpm@selenic.com>
date Sat, 09 Apr 2011 15:52:19 -0500
parents 3259a067c102
children 67f20625703f
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Feb 07 16:37:03 2011 -0500
+++ b/tests/run-tests.py	Sat Apr 09 15:52:19 2011 -0500
@@ -620,7 +620,8 @@
                 ret = os.WEXITSTATUS(ret)
         except Timeout:
             vlog('# Process %d timed out - killing it' % proc.pid)
-            ret = cleanup()
+            cleanup()
+            ret = 'timeout'
             output += ("\n### Abort: timeout after %d seconds.\n"
                        % options.timeout)
         except KeyboardInterrupt:
@@ -752,11 +753,13 @@
             skip(missing[-1])
     elif out != refout:
         mark = '!'
-        if ret:
+        if ret == 'timeout':
+            fail("timed out")
+        elif ret:
             fail("output changed and returned error code %d" % ret)
         else:
             fail("output changed")
-        if not options.nodiff:
+        if ret != 'timeout' and not options.nodiff:
             if options.view:
                 os.system("%s %s %s" % (options.view, ref, err))
             else: