Changeset 100589 in webkit


Ignore:
Timestamp:
Nov 17, 2011 2:12:11 AM (12 years ago)
Author:
abarth@webkit.org
Message:

Minor style nits in run_webkit_tests.py
https://bugs.webkit.org/show_bug.cgi?id=72583

Reviewed by Eric Seidel.

This patch just fixes some minor style issues as I work my way back
into this code.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r100587 r100589  
     12011-11-17  Adam Barth  <abarth@webkit.org>
     2
     3        Minor style nits in run_webkit_tests.py
     4        https://bugs.webkit.org/show_bug.cgi?id=72583
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch just fixes some minor style issues as I work my way back
     9        into this code.
     10
     11        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     12
    1132011-11-17  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r100558 r100589  
    3030# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    3131
    32 """Run layout tests."""
    33 
    3432import errno
    3533import logging
     
    4038
    4139from webkitpy.common.host import Host
    42 
    43 from webkitpy import layout_tests
    44 
    4540from webkitpy.layout_tests.controllers.manager import Manager, WorkerException
    4641from webkitpy.layout_tests.views import printing
     
    5045
    5146
    52 def run(port, options, args, regular_output=sys.stderr,
    53         buildbot_output=sys.stdout):
    54     """Run the tests.
    55 
    56     Args:
    57       port: Port object for port-specific behavior
    58       options: a dictionary of command line options
    59       args: a list of sub directories or files to test
    60       regular_output: a stream-like object that we can send logging/debug
    61           output to
    62       buildbot_output: a stream-like object that we can write all output that
    63           is intended to be parsed by the buildbot to
    64     Returns:
    65       the number of unexpected results that occurred, or -1 if there is an
    66           error.
    67 
    68     """
     47def run(port, options, args, regular_output=sys.stderr, buildbot_output=sys.stdout):
    6948    warnings = _set_up_derived_options(port, options)
    7049
    71     printer = printing.Printer(port, options, regular_output, buildbot_output,
    72                                configure_logging=True)
    73     for w in warnings:
    74         _log.warning(w)
     50    printer = printing.Printer(port, options, regular_output, buildbot_output, configure_logging=True)
     51
     52    for warning in warnings:
     53        _log.warning(warning)
    7554
    7655    if options.help_printing:
     
    8160    # We wrap any parts of the run that are slow or likely to raise exceptions
    8261    # in a try/finally to ensure that we clean up the logging configuration.
    83     num_unexpected_results = -1
     62    unexpected_result_count = -1
    8463    try:
    8564        manager = Manager(port, options, printer)
     
    10786        result_summary = manager.set_up_run()
    10887        if result_summary:
    109             num_unexpected_results = manager.run(result_summary)
     88            unexpected_result_count = manager.run(result_summary)
    11089            manager.clean_up_run()
    111             _log.debug("Testing completed, Exit status: %d" %
    112                        num_unexpected_results)
     90            _log.debug("Testing completed, Exit status: %d" % unexpected_result_count)
    11391    finally:
    11492        printer.cleanup()
    11593
    116     return num_unexpected_results
     94    return unexpected_result_count
    11795
    11896
Note: See TracChangeset for help on using the changeset viewer.