##// END OF EJS Templates
run-tests: sort options
Matt Mackall -
r11039:cf0a309f default
parent child Browse files
Show More
@@ -83,34 +83,43 b' defaults = {'
83 83
84 84 def parseargs():
85 85 parser = optparse.OptionParser("%prog [options] [tests]")
86
87 # keep these sorted
88 parser.add_option("--blacklist", action="append",
89 help="skip tests listed in the specified blacklist file")
86 90 parser.add_option("-C", "--annotate", action="store_true",
87 91 help="output files annotated with coverage")
88 92 parser.add_option("--child", type="int",
89 93 help="run as child process, summary to given fd")
90 94 parser.add_option("-c", "--cover", action="store_true",
91 95 help="print a test coverage report")
96 parser.add_option("-d", "--debug", action="store_true",
97 help="debug mode: write output of test scripts to console"
98 " rather than capturing and diff'ing it (disables timeout)")
92 99 parser.add_option("-f", "--first", action="store_true",
93 100 help="exit on the first test failure")
101 parser.add_option("--inotify", action="store_true",
102 help="enable inotify extension when running tests")
94 103 parser.add_option("-i", "--interactive", action="store_true",
95 104 help="prompt to accept changed output")
96 105 parser.add_option("-j", "--jobs", type="int",
97 106 help="number of jobs to run in parallel"
98 107 " (default: $%s or %d)" % defaults['jobs'])
99 parser.add_option("-k", "--keywords",
100 help="run tests matching keywords")
101 108 parser.add_option("--keep-tmpdir", action="store_true",
102 109 help="keep temporary directory after running tests")
103 parser.add_option("--tmpdir", type="string",
104 help="run tests in the given temporary directory"
105 " (implies --keep-tmpdir)")
106 parser.add_option("-d", "--debug", action="store_true",
107 help="debug mode: write output of test scripts to console"
108 " rather than capturing and diff'ing it (disables timeout)")
109 parser.add_option("-R", "--restart", action="store_true",
110 help="restart at last error")
110 parser.add_option("-k", "--keywords",
111 help="run tests matching keywords")
112 parser.add_option("-l", "--local", action="store_true",
113 help="shortcut for --with-hg=<testdir>/../hg")
114 parser.add_option("-n", "--nodiff", action="store_true",
115 help="skip showing test changes")
111 116 parser.add_option("-p", "--port", type="int",
112 117 help="port on which servers should listen"
113 118 " (default: $%s or %d)" % defaults['port'])
119 parser.add_option("--pure", action="store_true",
120 help="use pure Python code instead of C extensions")
121 parser.add_option("-R", "--restart", action="store_true",
122 help="restart at last error")
114 123 parser.add_option("-r", "--retest", action="store_true",
115 124 help="retest failed tests")
116 125 parser.add_option("-S", "--noskips", action="store_true",
@@ -118,24 +127,17 b' def parseargs():'
118 127 parser.add_option("-t", "--timeout", type="int",
119 128 help="kill errant tests after TIMEOUT seconds"
120 129 " (default: $%s or %d)" % defaults['timeout'])
130 parser.add_option("--tmpdir", type="string",
131 help="run tests in the given temporary directory"
132 " (implies --keep-tmpdir)")
121 133 parser.add_option("-v", "--verbose", action="store_true",
122 134 help="output verbose messages")
123 parser.add_option("-n", "--nodiff", action="store_true",
124 help="skip showing test changes")
125 135 parser.add_option("--with-hg", type="string",
126 136 metavar="HG",
127 137 help="test using specified hg script rather than a "
128 138 "temporary installation")
129 parser.add_option("-l", "--local", action="store_true",
130 help="shortcut for --with-hg=<testdir>/../hg")
131 parser.add_option("--pure", action="store_true",
132 help="use pure Python code instead of C extensions")
133 139 parser.add_option("-3", "--py3k-warnings", action="store_true",
134 140 help="enable Py3k warnings on Python 2.6+")
135 parser.add_option("--inotify", action="store_true",
136 help="enable inotify extension when running tests")
137 parser.add_option("--blacklist", action="append",
138 help="skip tests listed in the specified blacklist file")
139 141
140 142 for option, default in defaults.items():
141 143 defaults[option] = int(os.environ.get(*default))
General Comments 0
You need to be logged in to leave comments. Login now