Changeset 87591 in webkit


Ignore:
Timestamp:
May 27, 2011 6:56:23 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-05-27 Dirk Pranke <dpranke@chromium.org>

Reviewed by Ojan Vafai.

NRWT: debug messages from the workers are being logged twice
https://bugs.webkit.org/show_bug.cgi?id=60428

It looks like when the workers are run in separate processes
we end up getting two copies of every log message they print.
This has to do with the multiprocessing module on UNIX cloning
the log configuration in a way I wasn't expecting, and so two
log handlers end up getting registered.

  • Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py:
  • Scripts/webkitpy/layout_tests/layout_package/printing.py:
  • Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r87537 r87591  
     12011-05-27  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        NRWT: debug messages from the workers are being logged twice
     6        https://bugs.webkit.org/show_bug.cgi?id=60428
     7
     8        It looks like when the workers are run in separate processes
     9        we end up getting two copies of every log message they print.
     10        This has to do with the multiprocessing module on UNIX cloning
     11        the log configuration in a way I wasn't expecting, and so two
     12        log handlers end up getting registered.
     13
     14        * Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py:
     15        * Scripts/webkitpy/layout_tests/layout_package/printing.py:
     16        * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
     17        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     18
    1192011-05-27  Adam Roben  <aroben@apple.com>
    220
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/manager_worker_broker.py

    r84596 r87591  
    320320            options = self._options
    321321            port_obj = port.get(self._platform_name, options)
     322
     323            # The unix multiprocessing implementation clones the
     324            # log handler configuration into the child processes,
     325            # but the win implementation doesn't.
     326            configure_logging = (sys.platform == 'win32')
     327
    322328            # FIXME: this won't work if the calling process is logging
    323329            # somewhere other than sys.stderr and sys.stdout, but I'm not sure
    324330            # if this will be an issue in practice.
    325331            printer = printing.Printer(port_obj, options, sys.stderr, sys.stdout,
    326                 int(options.child_processes), options.experimental_fully_parallel)
     332                int(options.child_processes), options.experimental_fully_parallel,
     333                configure_logging)
    327334            self._client.run(port_obj)
    328335            printer.cleanup()
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/printing.py

    r85875 r87591  
    211211    output gets logged to stderr."""
    212212    def __init__(self, port, options, regular_output, buildbot_output,
    213                  child_processes, is_fully_parallel):
     213                 child_processes, is_fully_parallel, configure_logging):
    214214        """
    215215        Args
     
    225225                             in shards (usually controlled by
    226226                             --experimental-fully-parallel)
    227 
    228         Note that the last two args are separate rather than bundled into
     227          configure_loggign  Whether a logging handler should be registered
     228
     229        Note that the fourth and fifth args are separate rather than bundled into
    229230        the options structure so that this object does not assume any flags
    230231        set in options that weren't returned from logging_options(), above.
     
    245246        self._meter = metered_stream.MeteredStream(options.verbose,
    246247                                                   regular_output)
    247         self._logging_handler = _configure_logging(self._meter,
    248             options.verbose)
     248        self._logging_handler = None
     249        if configure_logging:
     250            self._logging_handler = _configure_logging(self._meter, options.verbose)
    249251
    250252        self.switches = parse_print_options(options.print_options,
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py

    r85658 r87591  
    128128        printer = printing.Printer(self._port, options, regular_output,
    129129                                   buildbot_output, single_threaded,
    130                                    is_fully_parallel)
     130                                   is_fully_parallel,
     131                                   configure_logging=True)
    131132        return printer, regular_output, buildbot_output
    132133
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r85927 r87591  
    7373
    7474    printer = printing.Printer(port, options, regular_output, buildbot_output,
    75         int(options.child_processes), options.experimental_fully_parallel)
     75        int(options.child_processes), options.experimental_fully_parallel,
     76        configure_logging=True)
    7677    for w in warnings:
    7778        _log.warning(w)
Note: See TracChangeset for help on using the changeset viewer.