# HG changeset patch # User Matt Mackall # Date 1160453321 18000 # Node ID 3cd51b986172a750e180407f4348e6be1d45254e # Parent 642e5faf6bf0d030d53dd5670e1c7b334d6f87e0 run-tests: add --first switch to exit on first error diff -r 642e5faf6bf0 -r 3cd51b986172 tests/run-tests.py --- a/tests/run-tests.py Mon Oct 09 23:05:11 2006 -0500 +++ b/tests/run-tests.py Mon Oct 09 23:08:41 2006 -0500 @@ -34,6 +34,8 @@ 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 @@ skipped += 1 elif not ret: failed += 1 + if options.first: + break tests += 1 print "\n# Ran %d tests, %d skipped, %d failed." % (tests, skipped,