⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 130690 in webkit


Ignore:
Timestamp:
Oct 8, 2012, 3:06:07 PM (14 years ago)
Author:
dpranke@chromium.org
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):

Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r130682 r130690  
     12012-10-08  Dirk Pranke  <dpranke@chromium.org>
     2
     3        nrwt: [chromium] run http tests in parallel on bigger machines
     4        https://bugs.webkit.org/show_bug.cgi?id=98562
     5
     6        Reviewed by Eric Seidel.
     7
     8        The "locked tests" shard (which includes the http tests and the
     9        perf tests) is the long pole on machines where we have 4 or more
     10        workers, so we should start making sure that
     11        we can run http tests in parallel, following the normal sharding
     12        rules (all tests in the same directory are in the same shard by
     13        default). We should still probably limit the number of workers
     14        hitting the web server in parallel where we can; a heuristic of
     15        no more than 25% of them seems okay for a start. This will
     16        likely only affect developer workstations and a couple of bots
     17        at first, so should be low risk and a good reward.
     18
     19        * Scripts/webkitpy/layout_tests/port/base.py:
     20        (Port.default_max_locked_shards):
     21        * Scripts/webkitpy/layout_tests/port/chromium.py:
     22        (ChromiumPort.default_max_locked_shards):
     23        * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
     24        (ChromiumPortTestCase.test_default_max_locked_shards):
     25        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
     26        (PortTestCase.test_default_max_locked_shards):
     27        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     28        (_set_up_derived_options):
     29        (parse_args):
     30        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
     31        (MainTest.test_max_locked_shards):
     32
    1332012-10-08  Zan Dobersek  <zandobersek@gmail.com>
    234
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r130597 r130690  
    183183        return self._executive.cpu_count()
    184184
     185    def default_max_locked_shards(self):
     186        """Return the number of "locked" shards to run in parallel (like the http tests)."""
     187        return 1
     188
    185189    def worker_startup_delay_secs(self):
    186190        # FIXME: If we start workers up too quickly, DumpRenderTree appears
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r130179 r130690  
    113113        return True
    114114
     115    def default_max_locked_shards(self):
     116        """Return the number of "locked" shards to run in parallel (like the http tests)."""
     117        max_locked_shards = int(self.default_child_processes()) / 4
     118        if not max_locked_shards:
     119            return 1
     120        return max_locked_shards
     121
    115122    def default_pixel_tests(self):
    116123        return True
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py

    r130179 r130690  
    4949        port.check_build(needs_http=True)
    5050
     51    def test_default_max_locked_shards(self):
     52        port = self.make_port()
     53        port.default_child_processes = lambda: 16
     54        self.assertEquals(port.default_max_locked_shards(), 4)
     55        port.default_child_processes = lambda: 2
     56        self.assertEquals(port.default_max_locked_shards(), 1)
     57
    5158    def test_default_timeout_ms(self):
    5259        self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py

    r130083 r130690  
    9191        return self.port_maker(host, port_name, options=options, config=config, **kwargs)
    9292
     93    def test_default_max_locked_shards(self):
     94        port = self.make_port()
     95        port.default_child_processes = lambda: 16
     96        self.assertEquals(port.default_max_locked_shards(), 1)
     97        port.default_child_processes = lambda: 2
     98        self.assertEquals(port.default_max_locked_shards(), 1)
     99
    93100    def test_default_timeout_ms(self):
    94101        self.assertEquals(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r130381 r130690  
    130130        options.child_processes = os.environ.get("WEBKIT_TEST_CHILD_PROCESSES",
    131131                                                 str(port.default_child_processes()))
     132    if not options.max_locked_shards:
     133        options.max_locked_shards = int(os.environ.get("WEBKIT_TEST_MAX_LOCKED_SHARDS",
     134                                                       str(port.default_max_locked_shards())))
    132135
    133136    if not options.configuration:
    … …  
    417420            dest="retry_failures",
    418421            help="Don't re-try any tests that produce unexpected results."),
    419         optparse.make_option("--max-locked-shards", type="int", default=1,
     422        optparse.make_option("--max-locked-shards", type="int", default=0,
    420423            help="Set the maximum number of locked shards"),
    421424        optparse.make_option("--additional-env-var", type="string", action="append", default=[],
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r130559 r130690  
    302302            self.assertTrue(len(batch) <= 2, '%s had too many tests' % ', '.join(batch))
    303303
     304    def test_max_locked_shards(self):
     305        if not self.should_test_processes:
     306            return
     307        _, _, regular_output, _ = logging_run(['--debug-rwt-logging', '--child-processes', '2'], shared_port=False)
     308        self.assertTrue(any(['(1 locked)' in line for line in regular_output.buflist]))
     309
    304310    def test_child_processes_2(self):
    305311        if self.should_test_processes:
Note: See TracChangeset for help on using the changeset viewer.