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

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

Issue 2617563002: Revert of Make run_webkit_tests random order by default for all platforms (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 default=0, 322 default=0,
323 help="Set the maximum number of locked shards"), 323 help="Set the maximum number of locked shards"),
324 optparse.make_option( 324 optparse.make_option(
325 "--nocheck-sys-deps", 325 "--nocheck-sys-deps",
326 action="store_true", 326 action="store_true",
327 default=False, 327 default=False,
328 help="Don't check the system dependencies (themes)"), 328 help="Don't check the system dependencies (themes)"),
329 optparse.make_option( 329 optparse.make_option(
330 "--order", 330 "--order",
331 action="store", 331 action="store",
332 default="random", 332 # TODO(jeffcarp): platforms are moving to random-order by defaul t independently.
333 # See _set_up_derived_options below and crbug.com/601332.
334 default=("default"),
333 help=("Determine the order in which the test cases will be run. " 335 help=("Determine the order in which the test cases will be run. "
334 "'none' == use the order in which the tests were listed " 336 "'none' == use the order in which the tests were listed "
335 "either in arguments or test list, " 337 "either in arguments or test list, "
336 "'random' == pseudo-random order (default). Seed can be sp ecified " 338 "'random' == pseudo-random order. Seed can be specified "
337 "via --seed, otherwise it will default to the current unix timestamp. " 339 "via --seed, otherwise it will default to the current unix timestamp "
338 "'natural' == use the natural order")), 340 "(default on Mac & Linux). "
341 "'natural' == use the natural order (default on all others ).")),
339 optparse.make_option( 342 optparse.make_option(
340 "--profile", 343 "--profile",
341 action="store_true", 344 action="store_true",
342 help="Output per-test profile information."), 345 help="Output per-test profile information."),
343 optparse.make_option( 346 optparse.make_option(
344 "--profiler", 347 "--profiler",
345 action="store", 348 action="store",
346 help="Output per-test profile information, using the specified p rofiler."), 349 help="Output per-test profile information, using the specified p rofiler."),
347 optparse.make_option( 350 optparse.make_option(
348 "--repeat-each", 351 "--repeat-each",
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) + 1 559 options.total_shards = int(port.host.environ['GTEST_TOTAL_SHARDS']) + 1
557 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ: 560 if not options.shard_index and 'GTEST_SHARD_INDEX' in port.host.environ:
558 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX']) 561 options.shard_index = int(port.host.environ['GTEST_SHARD_INDEX'])
559 if options.shard_index is not None and options.total_shards is not None: 562 if options.shard_index is not None and options.total_shards is not None:
560 options.run_part = '%d:%d' % (int(options.shard_index) + 1, 563 options.run_part = '%d:%d' % (int(options.shard_index) + 1,
561 int(options.total_shards)) 564 int(options.total_shards))
562 565
563 if not options.seed: 566 if not options.seed:
564 options.seed = port.host.time() 567 options.seed = port.host.time()
565 568
569 # TODO(jeffcarp): This will be removed once all platforms move to random ord er.
570 # This must be here and not in parse_args because host is not instantiated y et there.
571 # See crbug.com/601332.
572 if options.order == 'default':
573 port_name = port.host.port_factory.get().port_name
574 if port_name.startswith(("linux-", "mac-")):
575 options.order = 'random'
576 else:
577 options.order = 'natural'
578
566 def _run_tests(port, options, args, printer): 579 def _run_tests(port, options, args, printer):
567 _set_up_derived_options(port, options, args) 580 _set_up_derived_options(port, options, args)
568 manager = Manager(port, options, printer) 581 manager = Manager(port, options, printer)
569 printer.print_config(port.results_directory()) 582 printer.print_config(port.results_directory())
570 return manager.run(args) 583 return manager.run(args)
571 584
572 585
573 def run(port, options, args, logging_stream, stdout): 586 def run(port, options, args, logging_stream, stdout):
574 logger = logging.getLogger() 587 logger = logging.getLogger()
575 logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO ) 588 logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO )
(...skipping 26 matching lines...) Expand all
602 _log.debug("\t%s", process) 615 _log.debug("\t%s", process)
603 616
604 return run_details 617 return run_details
605 618
606 finally: 619 finally:
607 printer.cleanup() 620 printer.cleanup()
608 621
609 if __name__ == '__main__': 622 if __name__ == '__main__':
610 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr) 623 exit_code = main(sys.argv[1:], sys.stdout, sys.stderr)
611 sys.exit(exit_code) 624 sys.exit(exit_code)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698