Changeset 122513 in webkit


Ignore:
Timestamp:
Jul 12, 2012 2:55:37 PM (12 years ago)
Author:
dpranke@chromium.org
Message:

webkitpy: rename manager_worker_broker to message_pool
https://bugs.webkit.org/show_bug.cgi?id=91145

Reviewed by Ojan Vafai.

Since the MessagePool interface is more generic (and simpler)
now and will be reused by test-webkitpy, I'm renaming it and
moving it to webkitpy.common.

  • Scripts/webkitpy/common/message_pool.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py.
  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(TestRunInterruptedException.reduce):
(Manager._run_tests.worker_factory):
(Manager._run_tests):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
Location:
trunk/Tools
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r122505 r122513  
     12012-07-12  Dirk Pranke  <dpranke@chromium.org>
     2
     3        webkitpy: rename manager_worker_broker to message_pool
     4        https://bugs.webkit.org/show_bug.cgi?id=91145
     5
     6        Reviewed by Ojan Vafai.
     7
     8        Since the MessagePool interface is more generic (and simpler)
     9        now and will be reused by test-webkitpy, I'm renaming it and
     10        moving it to webkitpy.common.
     11
     12        * Scripts/webkitpy/common/message_pool.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py.
     13        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     14        (TestRunInterruptedException.__reduce__):
     15        (Manager._run_tests.worker_factory):
     16        (Manager._run_tests):
     17        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
     18
    1192012-07-12  Dirk Pranke  <dpranke@chromium.org>
    220
  • trunk/Tools/Scripts/webkitpy/common/message_pool.py

    • Property svn:executable deleted
    r122511 r122513  
    2727# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828
    29 """Module for handling messages and concurrency for run-webkit-tests."""
     29"""Module for handling messages and concurrency for run-webkit-tests
     30and test-webkitpy. This module follows the design for multiprocessing.Pool
     31and concurrency.futures.ProcessPoolExecutor, with the following differences:
     32
     33* Tasks are executed in stateful subprocesses via objects that implement the
     34  Worker interface - this allows the workers to share state across tasks.
     35* The pool provides an asynchronous event-handling interface so the caller
     36  may receive events as tasks are processed.
     37
     38If you don't need these features, use multiprocessing.Pool or concurrency.futures
     39intead.
     40
     41"""
    3042
    3143import cPickle
     
    4052from webkitpy.common.host import Host
    4153from webkitpy.common.system import stack_utils
    42 from webkitpy.layout_tests.views import metered_stream
    4354
    4455
     
    282293        for h in self._logger.handlers:
    283294            # log handlers don't have names until python 2.7.
    284             # FIXME: get webkitpy.test.printer from a constant as well.
    285             if getattr(h, 'name', '') in (metered_stream.LOG_HANDLER_NAME, 'webkitpy.test.printer'):
     295            # FIXME: log handler names should be passed in.
     296            if getattr(h, 'name', '') in ('MeteredStreamLogHandler', 'webkitpy.test.printer'):
    286297                self._logger.removeHandler(h)
    287298                break
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r122505 r122513  
    4545import time
    4646
    47 from webkitpy.layout_tests.controllers import manager_worker_broker
     47from webkitpy.common import message_pool
    4848from webkitpy.layout_tests.controllers import worker
    4949from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
     
    265265
    266266
    267 # Export this so callers don't need to know about manager_worker_broker.
    268 WorkerException = manager_worker_broker.WorkerException
     267# Export this so callers don't need to know about message pools.
     268WorkerException = message_pool.WorkerException
    269269
    270270
     
    768768            return worker.Worker(worker_connection, self.results_directory(), self._options)
    769769
    770         manager_connection = manager_worker_broker.get(num_workers, self, worker_factory, self._port.host)
    771 
    772770        if self._options.dry_run:
    773771            return (keyboard_interrupted, interrupted, self._worker_stats.values(), self._group_stats, self._all_results)
     
    776774
    777775        try:
    778             with manager_worker_broker.get(self, worker_factory, num_workers, self._port.worker_startup_delay_secs(), self._port.host) as pool:
     776            with message_pool.get(self, worker_factory, num_workers, self._port.worker_startup_delay_secs(), self._port.host) as pool:
    779777                pool.run(('test_list', shard.name, shard.test_inputs) for shard in all_shards)
    780778        except KeyboardInterrupt:
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r122505 r122513  
    5252from webkitpy.layout_tests import port
    5353from webkitpy.layout_tests import run_webkit_tests
    54 from webkitpy.layout_tests.controllers.manager_worker_broker import WorkerException
     54from webkitpy.layout_tests.controllers.manager import WorkerException
    5555from webkitpy.layout_tests.port import Port
    5656from webkitpy.layout_tests.port.test import TestPort, TestDriver
Note: See TracChangeset for help on using the changeset viewer.