- Revision
- 130690
- Author
- [email protected]
- Date
- 2012-10-08 15:06:07 -0700 (Mon, 08 Oct 2012)
Log Message
nrwt: [chromium] run http tests in parallel on bigger machines
https://bugs.webkit.org/show_bug.cgi?id=98562
Reviewed by Eric Seidel.
The "locked tests" shard (which includes the http tests and the
perf tests) is the long pole on machines where we have 4 or more
workers, so we should start making sure that
we can run http tests in parallel, following the normal sharding
rules (all tests in the same directory are in the same shard by
default). We should still probably limit the number of workers
hitting the web server in parallel where we can; a heuristic of
no more than 25% of them seems okay for a start. This will
likely only affect developer workstations and a couple of bots
at first, so should be low risk and a good reward.
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.default_max_locked_shards):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.default_max_locked_shards):
* Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
(ChromiumPortTestCase.test_default_max_locked_shards):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(PortTestCase.test_default_max_locked_shards):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):
(parse_args):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_max_locked_shards):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (130689 => 130690)
--- trunk/Tools/ChangeLog 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/ChangeLog 2012-10-08 22:06:07 UTC (rev 130690)
@@ -1,3 +1,35 @@
+2012-10-08 Dirk Pranke <[email protected]>
+
+ nrwt: [chromium] run http tests in parallel on bigger machines
+ https://bugs.webkit.org/show_bug.cgi?id=98562
+
+ Reviewed by Eric Seidel.
+
+ The "locked tests" shard (which includes the http tests and the
+ perf tests) is the long pole on machines where we have 4 or more
+ workers, so we should start making sure that
+ we can run http tests in parallel, following the normal sharding
+ rules (all tests in the same directory are in the same shard by
+ default). We should still probably limit the number of workers
+ hitting the web server in parallel where we can; a heuristic of
+ no more than 25% of them seems okay for a start. This will
+ likely only affect developer workstations and a couple of bots
+ at first, so should be low risk and a good reward.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (_set_up_derived_options):
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_max_locked_shards):
+
2012-10-08 Zan Dobersek <[email protected]>
GTK port should warn if bug modifier is missing in TestExpectations
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -182,6 +182,10 @@
"""Return the number of DumpRenderTree instances to use for this port."""
return self._executive.cpu_count()
+ def default_max_locked_shards(self):
+ """Return the number of "locked" shards to run in parallel (like the http tests)."""
+ return 1
+
def worker_startup_delay_secs(self):
# FIXME: If we start workers up too quickly, DumpRenderTree appears
# to thrash on something and time out its first few tests. Until
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -112,6 +112,13 @@
def is_chromium(self):
return True
+ def default_max_locked_shards(self):
+ """Return the number of "locked" shards to run in parallel (like the http tests)."""
+ max_locked_shards = int(self.default_child_processes()) / 4
+ if not max_locked_shards:
+ return 1
+ return max_locked_shards
+
def default_pixel_tests(self):
return True
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -48,6 +48,13 @@
port = self.make_port()
port.check_build(needs_http=True)
+ def test_default_max_locked_shards(self):
+ port = self.make_port()
+ port.default_child_processes = lambda: 16
+ self.assertEquals(port.default_max_locked_shards(), 4)
+ port.default_child_processes = lambda: 2
+ self.assertEquals(port.default_max_locked_shards(), 1)
+
def test_default_timeout_ms(self):
self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
self.assertEquals(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -90,6 +90,13 @@
port_name = self.port_maker.determine_full_port_name(host, options, port_name)
return self.port_maker(host, port_name, options=options, config=config, **kwargs)
+ def test_default_max_locked_shards(self):
+ port = self.make_port()
+ port.default_child_processes = lambda: 16
+ self.assertEquals(port.default_max_locked_shards(), 1)
+ port.default_child_processes = lambda: 2
+ self.assertEquals(port.default_max_locked_shards(), 1)
+
def test_default_timeout_ms(self):
self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
self.assertEquals(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 35000)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -129,6 +129,9 @@
if not options.child_processes:
options.child_processes = os.environ.get("WEBKIT_TEST_CHILD_PROCESSES",
str(port.default_child_processes()))
+ if not options.max_locked_shards:
+ options.max_locked_shards = int(os.environ.get("WEBKIT_TEST_MAX_LOCKED_SHARDS",
+ str(port.default_max_locked_shards())))
if not options.configuration:
options.configuration = port.default_configuration()
@@ -416,7 +419,7 @@
optparse.make_option("--no-retry-failures", action=""
dest="retry_failures",
help="Don't re-try any tests that produce unexpected results."),
- optparse.make_option("--max-locked-shards", type="int", default=1,
+ optparse.make_option("--max-locked-shards", type="int", default=0,
help="Set the maximum number of locked shards"),
optparse.make_option("--additional-env-var", type="string", action="" default=[],
help="Passes that environment variable to the tests (--additional-env-var=NAME=VALUE)"),
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (130689 => 130690)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-10-08 21:55:10 UTC (rev 130689)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-10-08 22:06:07 UTC (rev 130690)
@@ -301,6 +301,12 @@
for batch in batch_tests_run:
self.assertTrue(len(batch) <= 2, '%s had too many tests' % ', '.join(batch))
+ def test_max_locked_shards(self):
+ if not self.should_test_processes:
+ return
+ _, _, regular_output, _ = logging_run(['--debug-rwt-logging', '--child-processes', '2'], shared_port=False)
+ self.assertTrue(any(['(1 locked)' in line for line in regular_output.buflist]))
+
def test_child_processes_2(self):
if self.should_test_processes:
_, _, regular_output, _ = logging_run(