Mercurial > hg > mercurial-crew
comparison tests/run-tests.py @ 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 | 8ed67e44c71c |
children | 994ad067ac6e |
comparison
equal
deleted
inserted
replaced
13917:3259a067c102 | 13918:55f4941f98c8 |
---|---|
618 ret = proc.wait() | 618 ret = proc.wait() |
619 if wifexited(ret): | 619 if wifexited(ret): |
620 ret = os.WEXITSTATUS(ret) | 620 ret = os.WEXITSTATUS(ret) |
621 except Timeout: | 621 except Timeout: |
622 vlog('# Process %d timed out - killing it' % proc.pid) | 622 vlog('# Process %d timed out - killing it' % proc.pid) |
623 ret = cleanup() | 623 cleanup() |
624 ret = 'timeout' | |
624 output += ("\n### Abort: timeout after %d seconds.\n" | 625 output += ("\n### Abort: timeout after %d seconds.\n" |
625 % options.timeout) | 626 % options.timeout) |
626 except KeyboardInterrupt: | 627 except KeyboardInterrupt: |
627 vlog('# Handling keyboard interrupt') | 628 vlog('# Handling keyboard interrupt') |
628 cleanup() | 629 cleanup() |
750 skipped = False | 751 skipped = False |
751 else: | 752 else: |
752 skip(missing[-1]) | 753 skip(missing[-1]) |
753 elif out != refout: | 754 elif out != refout: |
754 mark = '!' | 755 mark = '!' |
755 if ret: | 756 if ret == 'timeout': |
757 fail("timed out") | |
758 elif ret: | |
756 fail("output changed and returned error code %d" % ret) | 759 fail("output changed and returned error code %d" % ret) |
757 else: | 760 else: |
758 fail("output changed") | 761 fail("output changed") |
759 if not options.nodiff: | 762 if ret != 'timeout' and not options.nodiff: |
760 if options.view: | 763 if options.view: |
761 os.system("%s %s %s" % (options.view, ref, err)) | 764 os.system("%s %s %s" % (options.view, ref, err)) |
762 else: | 765 else: |
763 showdiff(refout, out, ref, err) | 766 showdiff(refout, out, ref, err) |
764 ret = 1 | 767 ret = 1 |