Mercurial > hg
changeset 11039:cf0a309f6c4d
run-tests: sort options
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 29 Apr 2010 18:25:45 -0500 |
parents | 323557524006 |
children | 8f951ed6c63c |
files | tests/run-tests.py |
diffstat | 1 files changed, 22 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Thu Apr 29 18:25:45 2010 -0500 +++ b/tests/run-tests.py Thu Apr 29 18:25:45 2010 -0500 @@ -83,34 +83,43 @@ def parseargs(): parser = optparse.OptionParser("%prog [options] [tests]") + + # keep these sorted + parser.add_option("--blacklist", action="append", + help="skip tests listed in the specified blacklist file") parser.add_option("-C", "--annotate", action="store_true", help="output files annotated with coverage") parser.add_option("--child", type="int", help="run as child process, summary to given fd") parser.add_option("-c", "--cover", action="store_true", help="print a test coverage report") + parser.add_option("-d", "--debug", action="store_true", + help="debug mode: write output of test scripts to console" + " rather than capturing and diff'ing it (disables timeout)") parser.add_option("-f", "--first", action="store_true", help="exit on the first test failure") + parser.add_option("--inotify", action="store_true", + help="enable inotify extension when running tests") parser.add_option("-i", "--interactive", action="store_true", help="prompt to accept changed output") parser.add_option("-j", "--jobs", type="int", help="number of jobs to run in parallel" " (default: $%s or %d)" % defaults['jobs']) - parser.add_option("-k", "--keywords", - help="run tests matching keywords") parser.add_option("--keep-tmpdir", action="store_true", help="keep temporary directory after running tests") - parser.add_option("--tmpdir", type="string", - help="run tests in the given temporary directory" - " (implies --keep-tmpdir)") - parser.add_option("-d", "--debug", action="store_true", - help="debug mode: write output of test scripts to console" - " rather than capturing and diff'ing it (disables timeout)") - parser.add_option("-R", "--restart", action="store_true", - help="restart at last error") + parser.add_option("-k", "--keywords", + help="run tests matching keywords") + parser.add_option("-l", "--local", action="store_true", + help="shortcut for --with-hg=<testdir>/../hg") + parser.add_option("-n", "--nodiff", action="store_true", + help="skip showing test changes") parser.add_option("-p", "--port", type="int", help="port on which servers should listen" " (default: $%s or %d)" % defaults['port']) + parser.add_option("--pure", action="store_true", + help="use pure Python code instead of C extensions") + parser.add_option("-R", "--restart", action="store_true", + help="restart at last error") parser.add_option("-r", "--retest", action="store_true", help="retest failed tests") parser.add_option("-S", "--noskips", action="store_true", @@ -118,24 +127,17 @@ parser.add_option("-t", "--timeout", type="int", help="kill errant tests after TIMEOUT seconds" " (default: $%s or %d)" % defaults['timeout']) + parser.add_option("--tmpdir", type="string", + help="run tests in the given temporary directory" + " (implies --keep-tmpdir)") parser.add_option("-v", "--verbose", action="store_true", help="output verbose messages") - parser.add_option("-n", "--nodiff", action="store_true", - help="skip showing test changes") parser.add_option("--with-hg", type="string", metavar="HG", help="test using specified hg script rather than a " "temporary installation") - parser.add_option("-l", "--local", action="store_true", - help="shortcut for --with-hg=<testdir>/../hg") - parser.add_option("--pure", action="store_true", - help="use pure Python code instead of C extensions") parser.add_option("-3", "--py3k-warnings", action="store_true", help="enable Py3k warnings on Python 2.6+") - parser.add_option("--inotify", action="store_true", - help="enable inotify extension when running tests") - parser.add_option("--blacklist", action="append", - help="skip tests listed in the specified blacklist file") for option, default in defaults.items(): defaults[option] = int(os.environ.get(*default))