Changeset 57422 in webkit


Ignore:
Timestamp:
Apr 10, 2010 3:17:15 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-04-10 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

run_webkit_tests.py shouldn't have platform-specific logic
https://bugs.webkit.org/show_bug.cgi?id=37387

Dirk Pranke pointed out that my last patch was wrong because I
introduced platform-specific logic into run_webkit_tests.py, limiting
the parallelism in Chromium to work around a bug in the main Mac port.

  • Scripts/webkitpy/common/system/executive.py:
    • Fix a typo pointed out by Chris Jerdonek.
  • Scripts/webkitpy/layout_tests/port/base.py:
  • Scripts/webkitpy/layout_tests/port/mac.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57418 r57422  
     12010-04-10  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        run_webkit_tests.py shouldn't have platform-specific logic
     6        https://bugs.webkit.org/show_bug.cgi?id=37387
     7
     8        Dirk Pranke pointed out that my last patch was wrong because I
     9        introduced platform-specific logic into run_webkit_tests.py, limiting
     10        the parallelism in Chromium to work around a bug in the main Mac port.
     11
     12        * Scripts/webkitpy/common/system/executive.py:
     13            - Fix a typo pointed out by Chris Jerdonek.
     14        * Scripts/webkitpy/layout_tests/port/base.py:
     15        * Scripts/webkitpy/layout_tests/port/mac.py:
     16        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     17
    1182010-04-10  Robert Hogan  <robert@webkit.org>
    219
  • trunk/WebKitTools/Scripts/webkitpy/common/system/executive.py

    r57407 r57422  
    128128        # Darn.  We don't have the multiprocessing package.
    129129        system_name = platform.system()
    130         if system_name == "Dawin":
     130        if system_name == "Darwin":
    131131            return int(self.run_command(["sysctl", "-n", "hw.ncpu"]))
    132132        elif system_name == "Windows":
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py

    r57399 r57422  
    4343import websocket_server
    4444
     45from webkitpy.common.system.executive import Executive
     46
    4547# Python bug workaround.  See Port.wdiff_text() for an explanation.
    4648_wdiff_available = True
     
    6062        return flags_by_configuration[configuration]
    6163
    62     def __init__(self, port_name=None, options=None):
     64    def __init__(self, port_name=None, options=None, executive=Executive()):
    6365        self._name = port_name
    6466        self._options = options
     
    6769        self._webkit_base_dir = None
    6870        self._websocket_server = None
     71        self._executive = executive
     72
     73    def default_num_dump_render_trees(self):
     74        """Return the number of DumpRenderTree instances to use for this
     75        port."""
     76        return self._executive.cpu_count()
    6977
    7078    def baseline_path(self):
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py

    r57399 r57422  
    4646
    4747import webkitpy
    48 import webkitpy.common.system.executive as executive
    4948import webkitpy.common.system.ospath as ospath
    5049
     
    6665           options.pixel_tests is None):
    6766            options.pixel_tests = False
     67
     68    def default_num_dump_render_trees(self):
     69        # FIXME: new-run-webkit-tests is unstable on Mac running more than
     70        # four threads in parallel.
     71        # See https://bugs.webkit.org/show_bug.cgi?id=36622
     72        num_dump_render_trees = base.Port.default_num_dump_render_trees(self)
     73        if num_dump_render_trees > 4:
     74            return 4
     75        return num_dump_render_trees
    6876
    6977    def baseline_path(self):
     
    8694            self.flag_from_configuration(self._options.configuration),
    8795        ]
    88         if executive.run_command(build_drt_command, return_exit_code=True):
     96        if self._executive.run_command(build_drt_command, return_exit_code=True):
    8997            return False
    9098
     
    99107        java_tests_path = os.path.join(self.layout_tests_dir(), "java")
    100108        build_java = ["/usr/bin/make", "-C", java_tests_path]
    101         if executive.run_command(build_java, return_exit_code=True):
     109        if self._executive.run_command(build_java, return_exit_code=True):
    102110            _log.error("Failed to build Java support files: %s" % build_java)
    103111            return False
     
    325333    def _webkit_build_directory(self, args):
    326334        cmd = [self.script_path("webkit-build-directory")] + args
    327         return executive.run_command(cmd).rstrip()
     335        return self._executive.run_command(cmd).rstrip()
    328336
    329337    def _build_path(self, *comps):
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r57399 r57422  
    14281428    if not options.num_dump_render_trees:
    14291429        # FIXME: Investigate perf/flakiness impact of using cpu_count + 1.
    1430         options.num_dump_render_trees = executive.cpu_count()
    1431         # FIXME: new-run-webkit-tests is unstable on Mac running more than
    1432         # four threads in parallel.
    1433         # See https://bugs.webkit.org/show_bug.cgi?id=36622
    1434         if platform.system() == "Dawin" and options.num_dump_render_trees > 4:
    1435             options.num_dump_render_trees = 4
     1430        options.num_dump_render_trees = port_obj.default_num_dump_render_trees()
    14361431
    14371432    write = create_logging_writer(options, 'config')
Note: See TracChangeset for help on using the changeset viewer.