# HG changeset patch # User Matt Mackall # Date 1303499074 18000 # Node ID b29b7cbc252f93a5dad761a16f21991144a315e3 # Parent f31a5b7f5c0713a1df3a47d30c3c61802b071092 run-tests: move test loop into a helper function diff -r f31a5b7f5c07 -r b29b7cbc252f tests/run-tests.py --- a/tests/run-tests.py Fri Apr 22 12:24:22 2011 -0500 +++ b/tests/run-tests.py Fri Apr 22 14:04:34 2011 -0500 @@ -934,6 +934,12 @@ outputcoverage(options) sys.exit(failures != 0) +def runqueue(options, tests, results): + for test in tests: + ret = runone(options, test, results) + if options.first and ret is not None and not ret: + break + def runtests(options, tests): global DAEMON_PIDS, HGRCPATH DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') @@ -965,10 +971,7 @@ print "running all tests" tests = orig - for test in tests: - ret = runone(options, test, results) - if options.first and ret is not None and not ret: - break + runqueue(options, tests, results) failed = len(results['f']) tested = len(results['p']) + failed