# HG changeset patch # User Matt Mackall # Date 2013-06-02 23:09:06 # Node ID 8300adf9ca33a0e265ea04943a960b56481fb4ff # Parent 24138a25c971885fbf1064f9b99f24cc51809beb run-tests: add --loop support This makes it easy to run tests repeatedly at high loads to look for test failures. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -159,6 +159,8 @@ def parseargs(): help="run tests matching keywords") parser.add_option("-l", "--local", action="store_true", help="shortcut for --with-hg=/../hg") + parser.add_option("--loop", action="store_true", + help="loop tests repeatedly") parser.add_option("-n", "--nodiff", action="store_true", help="skip showing test changes") parser.add_option("-p", "--port", type="int", @@ -1088,6 +1090,8 @@ def scheduletests(options, tests): running -= 1 if tests and not running == jobs: test = tests.pop(0) + if options.loop: + tests.append(test) t = threading.Thread(None, job, args=(test, count)) t.start() running += 1