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

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

Issue 2557673003: Change run_webkit_tests default order to random on Linux and Mac (Closed)
Patch Set: Attempt to fix unit test failures on Mac & Windows by specifying order Created 4 years 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 5a4c7c8e2279652490793bc3d765336cb2ed4d05..5e2212a8248a26942e7658613d8f6187e5fec9cf 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -329,13 +329,16 @@ def parse_args(args):
optparse.make_option(
"--order",
action="store",
- default="natural",
+ # TODO(jeffcarp): platforms are moving to random-order by default independently.
+ # See _set_up_derived_options below and crbug.com/601332.
+ default=("default"),
help=("Determine the order in which the test cases will be run. "
"'none' == use the order in which the tests were listed "
"either in arguments or test list, "
- "'natural' == use the natural order (default), "
"'random' == pseudo-random order. Seed can be specified "
- "via --seed, otherwise it will default to the current unix timestamp.")),
+ "via --seed, otherwise it will default to the current unix timestamp "
+ "(default on Mac & Linux). "
+ "'natural' == use the natural order (default on all others).")),
optparse.make_option(
"--profile",
action="store_true",
@@ -547,6 +550,16 @@ def _set_up_derived_options(port, options, args):
if not options.seed:
options.seed = port.host.time()
+ # TODO(jeffcarp): This will be removed once all platforms move to random order.
+ # This must be here and not in parse_args because host is not instantiated yet there.
+ # See crbug.com/601332.
+ if options.order == 'default':
+ port_name = port.host.port_factory.get().port_name
+ if port_name.startswith(("linux-", "mac-")):
+ options.order = 'random'
+ else:
+ options.order = 'natural'
+
def _run_tests(port, options, args, printer):
_set_up_derived_options(port, options, args)
manager = Manager(port, options, printer)
« 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