Changeset 58789 in webkit


Ignore:
Timestamp:
May 4, 2010 5:16:49 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-05-04 Dirk Pranke <dpranke@chromium.org>

Reviewed by Eric Seidel.

new-run-webkit-tests: turn off threading on the Chromium Mac port until
we can stabilize the port more and figure out why it is hanging so
frequently.

https://bugs.webkit.org/show_bug.cgi?id=38553

  • Scripts/webkitpy/layout_tests/port/chromium_mac.py:
    • override default_child_processes() and log a warning
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
    • fix a typo that caused us to print a method object instead of the value the method object returns in the case where there is only one child process.
  • Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
    • Add unit tests for the output of run_webkit_tests - in this case, the handling of --child-processes and --print config
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r58777 r58789  
     12010-05-04  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        new-run-webkit-tests: turn off threading on the Chromium Mac port until
     6        we can stabilize the port more and figure out why it is hanging so
     7        frequently.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=38553
     10
     11        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
     12          - override default_child_processes() and log a warning
     13        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     14          - fix a typo that caused us to print a method object instead of the
     15            value the method object returns in the case where there is only
     16            one child process.
     17        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
     18          - Add unit tests for the output of run_webkit_tests - in this case,
     19            the handling of --child-processes and --print config
     20
    1212010-05-04  Timothy Hatcher  <timothy@apple.com>
    222
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_mac.py

    r58434 r58789  
    6767                       'MacBuildInstructions')
    6868        return result
     69
     70    def default_child_processes(self):
     71        # FIXME: we need to run single-threaded for now. See
     72        # https://bugs.webkit.org/show_bug.cgi?id=38553. Unfortunately this
     73        # routine is called right before the logger is configured, so if we
     74        # try to _log.warning(), it gets thrown away.
     75        import sys
     76        sys.stderr.write("Defaulting to one child - see https://bugs.webkit.org/show_bug.cgi?id=38553\n")
     77        return 1
    6978
    7079    def driver_name(self):
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r58759 r58789  
    12331233
    12341234
    1235 def run(port_obj, options, args):
     1235def run(port_obj, options, args, regular_output=sys.stderr,
     1236        buildbot_output=sys.stdout):
    12361237    """Run the tests.
    12371238
     
    12401241      options: a dictionary of command line options
    12411242      args: a list of sub directories or files to test
    1242       print_results: whether or not to log anything to stdout.
    1243           Set to false by the unit tests
     1243      regular_output: a stream-like object that we can send logging/debug
     1244          output to
     1245      buildbot_output: a stream-like object that we can write all output that
     1246          is intended to be parsed by the buildbot to
    12441247    Returns:
    12451248      the number of unexpected results that occurred, or -1 if there is an
     
    12541257        options.child_processes = port_obj.default_child_processes()
    12551258
    1256     printer = printing.Printer(port_obj, options, regular_output=sys.stderr,
    1257         buildbot_output=sys.stdout,
     1259    printer = printing.Printer(port_obj, options, regular_output=regular_output,
     1260        buildbot_output=buildbot_output,
    12581261        child_processes=int(options.child_processes),
    12591262        is_fully_parallel=options.experimental_fully_parallel)
     
    13171320
    13181321    if int(options.child_processes) == 1:
    1319         printer.print_config("Running one %s" % port_obj.driver_name)
     1322        printer.print_config("Running one %s" % port_obj.driver_name())
    13201323    else:
    13211324        printer.print_config("Running %s %ss in parallel" % (
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

    r58728 r58789  
    4040
    4141
     42class ArrayStream(object):
     43    def __init__(self):
     44        self._contents = []
     45
     46    def write(self, msg):
     47        self._contents.append(msg)
     48
     49    def get(self):
     50        return self._contents
     51
     52    def reset(self):
     53        self._contents = []
     54
     55    def empty(self):
     56        return (len(self._contents) == 0)
     57
     58    def flush(self):
     59        pass
     60
     61    def __repr__(self):
     62        return '<ArrayStream: ' + str(self._contents) + '>'
     63
     64
    4265def passing_run(args, port_obj=None, logging_included=False):
    4366    if not logging_included:
     
    4871    res = run_webkit_tests.run(port_obj, options, args)
    4972    return res == 0
     73
     74def logging_run(args):
     75    options, args = run_webkit_tests.parse_args(args)
     76    port_obj = port.get(options.platform, options)
     77    buildbot_output = ArrayStream()
     78    regular_output = ArrayStream()
     79    res = run_webkit_tests.run(port_obj, options, args,
     80                               buildbot_output=buildbot_output,
     81                               regular_output=regular_output)
     82    return (res, buildbot_output, regular_output)
    5083
    5184
     
    6396                                     '--print', 'unexpected',
    6497                                     'fast/html']))
     98
     99    def test_child_processes(self):
     100        (res, buildbot_output, regular_output) = logging_run(
     101             ['--platform', 'test', '--print', 'config', '--child-processes',
     102              '1', 'fast/html'])
     103        self.assertTrue('Running one DumpRenderTree\n'
     104                        in regular_output.get())
     105
     106        (res, buildbot_output, regular_output) = logging_run(
     107             ['--platform', 'test', '--print', 'config', '--child-processes',
     108              '2', 'fast/html'])
     109        self.assertTrue('Running 2 DumpRenderTrees in parallel\n'
     110                        in regular_output.get())
     111
    65112
    66113
Note: See TracChangeset for help on using the changeset viewer.