Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

Issue 452893002: [Nit] Sorting run-webkit-tests options in alphabetical order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing Comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # Copyright (C) 2011 Apple Inc. All rights reserved. 3 # Copyright (C) 2011 Apple Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 action="append", default=[], 108 action="append", default=[],
109 help="Run Android layout tests on these devices."), 109 help="Run Android layout tests on these devices."),
110 110
111 # FIXME: Flip this to be off by default once we can log the device setup more cleanly. 111 # FIXME: Flip this to be off by default once we can log the device setup more cleanly.
112 optparse.make_option("--no-android-logging", 112 optparse.make_option("--no-android-logging",
113 action="store_false", dest='android_logging', default=True, 113 action="store_false", dest='android_logging', default=True,
114 help="Do not log android-specific debug messages (default is to log as part of --debug-rwt-logging"), 114 help="Do not log android-specific debug messages (default is to log as part of --debug-rwt-logging"),
115 ])) 115 ]))
116 116
117 option_group_definitions.append(("Results Options", [ 117 option_group_definitions.append(("Results Options", [
118 optparse.make_option("--add-platform-exceptions", action="store_true", d efault=False,
119 help="Save generated results into the *most-specific-platform* direc tory rather than the *generic-platform* directory"),
120 optparse.make_option("--additional-drt-flag", action="append",
121 default=[], help="Additional command line flag to pass to the driver "
122 "Specify multiple times to add multiple flags."),
123 optparse.make_option("--additional-expectations", action="append", defau lt=[],
124 help="Path to a test_expectations file that will override previous e xpectations. "
125 "Specify multiple times for multiple sets of overrides."),
126 optparse.make_option("--additional-platform-directory", action="append",
127 default=[], help="Additional directory where to look for test "
128 "baselines (will take precendence over platform baselines). "
129 "Specify multiple times to add multiple search path entries."),
130 optparse.make_option("--build-directory",
131 help="Path to the directory under which build files are kept (should not include configuration)"),
132 optparse.make_option("--clobber-old-results", action="store_true",
133 default=False, help="Clobbers test results from previous runs."),
134 optparse.make_option("--compare-port", action="store", default=None,
135 help="Use the specified port's baselines first"),
136 optparse.make_option("--driver-name", type="string",
137 help="Alternative driver binary to use"),
138 optparse.make_option("--enable-versioned-results", action="store_true",
139 default=False, help="Archive the test results for later access."),
140 optparse.make_option("--full-results-html", action="store_true",
141 default=False,
142 help="Show all failures in results.html, rather than only regression s"),
143 optparse.make_option("--new-baseline", action="store_true",
144 default=False, help="Save generated results as new baselines "
145 "into the *most-specific-platform* directory, overwriting whate ver's "
146 "already there. Equivalent to --reset-results --add-platform-ex ceptions"),
147 optparse.make_option("--no-new-test-results", action="store_false",
148 dest="new_test_results", default=True,
149 help="Don't create new baselines when no expected results exist"),
150 optparse.make_option("--no-show-results", action="store_false",
151 default=True, dest="show_results",
152 help="Don't launch a browser with results after the tests "
153 "are done"),
118 optparse.make_option("-p", "--pixel", "--pixel-tests", action="store_tru e", 154 optparse.make_option("-p", "--pixel", "--pixel-tests", action="store_tru e",
119 dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"), 155 dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"),
120 optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_fal se", 156 optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_fal se",
121 dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"), 157 dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
122 optparse.make_option("--results-directory", help="Location of test resul ts"),
123 optparse.make_option("--build-directory",
124 help="Path to the directory under which build files are kept (should not include configuration)"),
125 optparse.make_option("--add-platform-exceptions", action="store_true", d efault=False,
126 help="Save generated results into the *most-specific-platform* direc tory rather than the *generic-platform* directory"),
127 optparse.make_option("--new-baseline", action="store_true",
128 default=False, help="Save generated results as new baselines "
129 "into the *most-specific-platform* directory, overwriting whate ver's "
130 "already there. Equivalent to --reset-results --add-platform-ex ceptions"),
131 optparse.make_option("--reset-results", action="store_true",
132 default=False, help="Reset expectations to the "
133 "generated results in their existing location."),
134 optparse.make_option("--no-new-test-results", action="store_false",
135 dest="new_test_results", default=True,
136 help="Don't create new baselines when no expected results exist"),
137 158
138 #FIXME: we should support a comma separated list with --pixel-test-direc tory as well. 159 #FIXME: we should support a comma separated list with --pixel-test-direc tory as well.
139 optparse.make_option("--pixel-test-directory", action="append", default= [], dest="pixel_test_directories", 160 optparse.make_option("--pixel-test-directory", action="append", default= [], dest="pixel_test_directories",
140 help="A directory where it is allowed to execute tests as pixel test s. " 161 help="A directory where it is allowed to execute tests as pixel test s. "
141 "Specify multiple times to add multiple directories. " 162 "Specify multiple times to add multiple directories. "
142 "This option implies --pixel-tests. If specified, only those te sts " 163 "This option implies --pixel-tests. If specified, only those te sts "
143 "will be executed as pixel tests that are located in one of the " 164 "will be executed as pixel tests that are located in one of the "
144 "directories enumerated with the option. Some ports may ignore this " 165 "directories enumerated with the option. Some ports may ignore this "
145 "option while others can have a default value that can be overr idden here."), 166 "option while others can have a default value that can be overr idden here."),
146 167
168 optparse.make_option("--reset-results", action="store_true",
169 default=False, help="Reset expectations to the "
170 "generated results in their existing location."),
171 optparse.make_option("--results-directory", help="Location of test resul ts"),
147 optparse.make_option("--skip-failing-tests", action="store_true", 172 optparse.make_option("--skip-failing-tests", action="store_true",
148 default=False, help="Skip tests that are expected to fail. " 173 default=False, help="Skip tests that are expected to fail. "
149 "Note: When using this option, you might miss new crashes " 174 "Note: When using this option, you might miss new crashes "
150 "in these tests."), 175 "in these tests."),
151 optparse.make_option("--additional-drt-flag", action="append",
152 default=[], help="Additional command line flag to pass to the driver "
153 "Specify multiple times to add multiple flags."),
154 optparse.make_option("--driver-name", type="string",
155 help="Alternative driver binary to use"),
156 optparse.make_option("--additional-platform-directory", action="append",
157 default=[], help="Additional directory where to look for test "
158 "baselines (will take precendence over platform baselines). "
159 "Specify multiple times to add multiple search path entries."),
160 optparse.make_option("--additional-expectations", action="append", defau lt=[],
161 help="Path to a test_expectations file that will override previous e xpectations. "
162 "Specify multiple times for multiple sets of overrides."),
163 optparse.make_option("--compare-port", action="store", default=None,
164 help="Use the specified port's baselines first"),
165 optparse.make_option("--no-show-results", action="store_false",
166 default=True, dest="show_results",
167 help="Don't launch a browser with results after the tests "
168 "are done"),
169 optparse.make_option("--full-results-html", action="store_true",
170 default=False,
171 help="Show all failures in results.html, rather than only regression s"),
172 optparse.make_option("--clobber-old-results", action="store_true",
173 default=False, help="Clobbers test results from previous runs."),
174 optparse.make_option("--enable-versioned-results", action="store_true",
175 default=False, help="Archive the test results for later access."),
176 optparse.make_option("--smoke", action="store_true", 176 optparse.make_option("--smoke", action="store_true",
177 help="Run just the SmokeTests"), 177 help="Run just the SmokeTests"),
178 optparse.make_option("--no-smoke", dest="smoke", action="store_false", 178 optparse.make_option("--no-smoke", dest="smoke", action="store_false",
179 help="Do not run just the SmokeTests"), 179 help="Do not run just the SmokeTests"),
180 ])) 180 ]))
181 181
182 option_group_definitions.append(("Testing Options", [ 182 option_group_definitions.append(("Testing Options", [
183 optparse.make_option("--additional-env-var", type="string", action="appe nd", default=[],
184 help="Passes that environment variable to the tests (--additional-en v-var=NAME=VALUE)"),
185 optparse.make_option("--batch-size",
186 help=("Run a the tests in batches (n), after every n tests, "
187 "the driver is relaunched."), type="int", default=None),
183 optparse.make_option("--build", dest="build", 188 optparse.make_option("--build", dest="build",
184 action="store_true", default=True, 189 action="store_true", default=True,
185 help="Check to ensure the build is up-to-date (default)."), 190 help="Check to ensure the build is up-to-date (default)."),
186 optparse.make_option("--no-build", dest="build", 191 optparse.make_option("--no-build", dest="build",
187 action="store_false", help="Don't check to see if the build is up-to -date."), 192 action="store_false", help="Don't check to see if the build is up-to -date."),
188 optparse.make_option("-n", "--dry-run", action="store_true", 193 optparse.make_option("--child-processes",
189 default=False, 194 help="Number of drivers to run in parallel."),
190 help="Do everything but actually run the tests or upload results."), 195 optparse.make_option("--disable-breakpad", action="store_true",
191 optparse.make_option("--nocheck-sys-deps", action="store_true", 196 help="Don't use breakpad to symbolize unexpected crashes."),
192 default=False, 197 optparse.make_option("--driver-logging", action="store_true",
193 help="Don't check the system dependencies (themes)"), 198 help="Print detailed logging of the driver/content_shell"),
194 optparse.make_option("--wrapper", 199 optparse.make_option("--enable-leak-detection", action="store_true",
195 help="wrapper command to insert before invocations of " 200 help="Enable the leak detection of DOM objects."),
196 "the driver; option is split on whitespace before " 201 optparse.make_option("--enable-sanitizer", action="store_true",
197 "running. (Example: --wrapper='valgrind --smc-check=all')"), 202 help="Only alert on sanitizer-related errors and crashes"),
198 optparse.make_option("-i", "--ignore-tests", action="append", default=[] , 203 optparse.make_option("--exit-after-n-crashes-or-timeouts", type="int",
199 help="directories or test to ignore (may specify multiple times)"), 204 default=None, help="Exit after the first N crashes instead of "
205 "running all tests"),
206 optparse.make_option("--exit-after-n-failures", type="int", default=None ,
207 help="Exit after the first N failures instead of running all "
208 "tests"),
209 optparse.make_option("--ignore-builder-category", action="store",
210 help=("The category of builders to use with the --ignore-flaky-tests "
211 "option ('layout' or 'deps').")),
200 optparse.make_option("--ignore-flaky-tests", action="store", 212 optparse.make_option("--ignore-flaky-tests", action="store",
201 help=("Control whether tests that are flaky on the bots get ignored. " 213 help=("Control whether tests that are flaky on the bots get ignored. "
202 "'very-flaky' == Ignore any tests that flaked more than once on the bot." 214 "'very-flaky' == Ignore any tests that flaked more than once on the bot."
203 "'maybe-flaky' == Ignore any tests that flaked once on the bot." 215 "'maybe-flaky' == Ignore any tests that flaked once on the bot."
204 "'unexpected' == Ignore any tests that had unexpected results on the bot.")), 216 "'unexpected' == Ignore any tests that had unexpected results on the bot.")),
205 optparse.make_option("--ignore-builder-category", action="store", 217 optparse.make_option("--iterations", type="int", default=1, help="Number of times to run the set of tests (e.g. ABCABCABC)"),
206 help=("The category of builders to use with the --ignore-flaky-tests " 218 optparse.make_option("--max-locked-shards", type="int", default=0,
207 "option ('layout' or 'deps').")), 219 help="Set the maximum number of locked shards"),
208 optparse.make_option("--test-list", action="append", 220 optparse.make_option("--no-retry-failures", action="store_false",
209 help="read list of tests to run from file", metavar="FILE"), 221 dest="retry_failures",
222 help="Don't re-try any tests that produce unexpected results."),
223 optparse.make_option("--nocheck-sys-deps", action="store_true",
224 default=False,
225 help="Don't check the system dependencies (themes)"),
226 optparse.make_option("--order", action="store", default="natural",
227 help=("determine the order in which the test cases will be run. "
228 "'none' == use the order in which the tests were listed either in arguments or test list, "
229 "'natural' == use the natural order (default), "
230 "'random-seeded' == randomize the test order using a fixed see d, "
231 "'random' == randomize the test order.")),
232 optparse.make_option("--profile", action="store_true",
233 help="Output per-test profile information."),
234 optparse.make_option("--profiler", action="store",
235 help="Output per-test profile information, using the specified profi ler."),
236 optparse.make_option("--repeat-each", type="int", default=1, help="Numbe r of times to run each test (e.g. AAABBBCCC)"),
237 optparse.make_option("--retry-failures", action="store_true",
238 help="Re-try any tests that produce unexpected results. Default is t o not retry if an explicit list of tests is passed to run-webkit-tests."),
239 optparse.make_option("--run-chunk",
240 help=("Run a specified chunk (n:l), the nth of len l, "
241 "of the layout tests")),
242 optparse.make_option("--run-part", help=("Run a specified part (n:m), "
243 "the nth of m parts, of the layout tests")),
244 optparse.make_option("--run-singly", action="store_true",
245 default=False, help="DEPRECATED, same as --batch-size=1 --verbose"),
210 optparse.make_option("--skipped", action="store", default=None, 246 optparse.make_option("--skipped", action="store", default=None,
211 help=("control how tests marked SKIP are run. " 247 help=("control how tests marked SKIP are run. "
212 "'default' == Skip tests unless explicitly listed on the comman d line, " 248 "'default' == Skip tests unless explicitly listed on the comman d line, "
213 "'ignore' == Run them anyway, " 249 "'ignore' == Run them anyway, "
214 "'only' == only run the SKIP tests, " 250 "'only' == only run the SKIP tests, "
215 "'always' == always skip, even if listed on the command line.") ), 251 "'always' == always skip, even if listed on the command line.") ),
252 optparse.make_option("--test-list", action="append",
253 help="read list of tests to run from file", metavar="FILE"),
216 optparse.make_option("--time-out-ms", 254 optparse.make_option("--time-out-ms",
217 help="Set the timeout for each test"), 255 help="Set the timeout for each test"),
218 optparse.make_option("--order", action="store", default="natural", 256 optparse.make_option("--wrapper",
219 help=("determine the order in which the test cases will be run. " 257 help="wrapper command to insert before invocations of "
220 "'none' == use the order in which the tests were listed either in arguments or test list, " 258 "the driver; option is split on whitespace before "
221 "'natural' == use the natural order (default), " 259 "running. (Example: --wrapper='valgrind --smc-check=all')"),
222 "'random-seeded' == randomize the test order using a fixed see d, "
223 "'random' == randomize the test order.")),
224 optparse.make_option("--run-chunk",
225 help=("Run a specified chunk (n:l), the nth of len l, "
226 "of the layout tests")),
227 optparse.make_option("--run-part", help=("Run a specified part (n:m), "
228 "the nth of m parts, of the layout tests")),
229 optparse.make_option("--batch-size",
230 help=("Run a the tests in batches (n), after every n tests, "
231 "the driver is relaunched."), type="int", default=None),
232 optparse.make_option("--run-singly", action="store_true",
233 default=False, help="DEPRECATED, same as --batch-size=1 --verbose"),
234 optparse.make_option("--child-processes",
235 help="Number of drivers to run in parallel."),
236 # FIXME: Display default number of child processes that will run. 260 # FIXME: Display default number of child processes that will run.
237 optparse.make_option("-f", "--fully-parallel", action="store_true", 261 optparse.make_option("-f", "--fully-parallel", action="store_true",
238 help="run all tests in parallel"), 262 help="run all tests in parallel"),
239 optparse.make_option("--exit-after-n-failures", type="int", default=None , 263 optparse.make_option("-i", "--ignore-tests", action="append", default=[] ,
240 help="Exit after the first N failures instead of running all " 264 help="directories or test to ignore (may specify multiple times)"),
241 "tests"), 265 optparse.make_option("-n", "--dry-run", action="store_true",
242 optparse.make_option("--exit-after-n-crashes-or-timeouts", type="int", 266 default=False,
243 default=None, help="Exit after the first N crashes instead of " 267 help="Do everything but actually run the tests or upload results."),
244 "running all tests"),
245 optparse.make_option("--iterations", type="int", default=1, help="Number of times to run the set of tests (e.g. ABCABCABC)"),
246 optparse.make_option("--repeat-each", type="int", default=1, help="Numbe r of times to run each test (e.g. AAABBBCCC)"),
247 optparse.make_option("--retry-failures", action="store_true",
248 help="Re-try any tests that produce unexpected results. Default is t o not retry if an explicit list of tests is passed to run-webkit-tests."),
249 optparse.make_option("--no-retry-failures", action="store_false",
250 dest="retry_failures",
251 help="Don't re-try any tests that produce unexpected results."),
252
253 optparse.make_option("--max-locked-shards", type="int", default=0,
254 help="Set the maximum number of locked shards"),
255 optparse.make_option("--additional-env-var", type="string", action="appe nd", default=[],
256 help="Passes that environment variable to the tests (--additional-en v-var=NAME=VALUE)"),
257 optparse.make_option("--profile", action="store_true",
258 help="Output per-test profile information."),
259 optparse.make_option("--profiler", action="store",
260 help="Output per-test profile information, using the specified profi ler."),
261 optparse.make_option("--driver-logging", action="store_true",
262 help="Print detailed logging of the driver/content_shell"),
263 optparse.make_option("--disable-breakpad", action="store_true",
264 help="Don't use breakpad to symbolize unexpected crashes."),
265 optparse.make_option("--enable-leak-detection", action="store_true",
266 help="Enable the leak detection of DOM objects."),
267 optparse.make_option("--enable-sanitizer", action="store_true",
268 help="Only alert on sanitizer-related errors and crashes"),
269 ])) 268 ]))
270 269
271 option_group_definitions.append(("Miscellaneous Options", [ 270 option_group_definitions.append(("Miscellaneous Options", [
272 optparse.make_option("--lint-test-files", action="store_true", 271 optparse.make_option("--lint-test-files", action="store_true",
273 default=False, help=("Makes sure the test files parse for all " 272 default=False, help=("Makes sure the test files parse for all "
274 "configurations. Does not run any tests.")), 273 "configurations. Does not run any tests.")),
275 ])) 274 ]))
276 275
277 # FIXME: Move these into json_results_generator.py 276 # FIXME: Move these into json_results_generator.py
278 option_group_definitions.append(("Result JSON Options", [ 277 option_group_definitions.append(("Result JSON Options", [
279 optparse.make_option("--master-name", help="The name of the buildbot mas ter."),
280 optparse.make_option("--builder-name", default="",
281 help=("The name of the builder shown on the waterfall running "
282 "this script e.g. WebKit.")),
283 optparse.make_option("--build-name", default="DUMMY_BUILD_NAME", 278 optparse.make_option("--build-name", default="DUMMY_BUILD_NAME",
284 help=("The name of the builder used in its path, e.g. " 279 help=("The name of the builder used in its path, e.g. "
285 "webkit-rel.")), 280 "webkit-rel.")),
286 optparse.make_option("--build-number", default="DUMMY_BUILD_NUMBER", 281 optparse.make_option("--build-number", default="DUMMY_BUILD_NUMBER",
287 help=("The build number of the builder running this script.")), 282 help=("The build number of the builder running this script.")),
283 optparse.make_option("--builder-name", default="",
284 help=("The name of the builder shown on the waterfall running "
285 "this script e.g. WebKit.")),
286 optparse.make_option("--master-name", help="The name of the buildbot mas ter."),
288 optparse.make_option("--test-results-server", default="", 287 optparse.make_option("--test-results-server", default="",
289 help=("If specified, upload results json files to this appengine " 288 help=("If specified, upload results json files to this appengine "
290 "server.")), 289 "server.")),
291 ])) 290 ]))
292 291
293 option_parser = optparse.OptionParser() 292 option_parser = optparse.OptionParser()
294 293
295 for group_name, group_options in option_group_definitions: 294 for group_name, group_options in option_group_definitions:
296 option_group = optparse.OptionGroup(option_parser, group_name) 295 option_group = optparse.OptionGroup(option_parser, group_name)
297 option_group.add_options(group_options) 296 option_group.add_options(group_options)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 printer.print_config(port.results_directory()) 377 printer.print_config(port.results_directory())
379 378
380 run_details = manager.run(args) 379 run_details = manager.run(args)
381 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code) 380 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code)
382 return run_details 381 return run_details
383 finally: 382 finally:
384 printer.cleanup() 383 printer.cleanup()
385 384
386 if __name__ == '__main__': 385 if __name__ == '__main__':
387 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr)) 386 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/factory.py ('k') | Tools/Scripts/webkitpy/layout_tests/views/printing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698