Mercurial > hg > mercurial-crew-with-dirclash
changeset 3307:3cd51b986172
run-tests: add --first switch to exit on first error
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 09 Oct 2006 23:08:41 -0500 |
parents | 642e5faf6bf0 |
children | 192085505f6f |
files | tests/run-tests.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -34,6 +34,8 @@ parser.add_option("-C", "--annotate", ac help="output files annotated with coverage") parser.add_option("-r", "--retest", action="store_true", help="retest failed tests") +parser.add_option("-f", "--first", action="store_true", + help="exit on the first test failure") parser.set_defaults(timeout=180) (options, args) = parser.parse_args() @@ -371,6 +373,8 @@ try: skipped += 1 elif not ret: failed += 1 + if options.first: + break tests += 1 print "\n# Ran %d tests, %d skipped, %d failed." % (tests, skipped,