Changeset 115286 in webkit


Ignore:
Timestamp:
Apr 25, 2012 9:57:07 PM (12 years ago)
Author:
Csaba Osztrogonác
Message:

Unreviewed, rolling out r115240.
http://trac.webkit.org/changeset/115240
https://bugs.webkit.org/show_bug.cgi?id=84928

It broke everything (Requested by Ossy_HOME on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-04-25

  • Scripts/webkitpy/layout_tests/port/gtk.py:

(GtkDriver):
(GtkDriver._start):
(GtkDriver._start.x_filter):
(GtkDriver.stop):
(GtkPort._driver_class):

  • Scripts/webkitpy/layout_tests/port/qt.py:

(QtPort._build_driver):

  • Scripts/webkitpy/layout_tests/port/xvfbdriver.py: Removed.
Location:
trunk/Tools
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r115268 r115286  
     12012-04-25  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r115240.
     4        http://trac.webkit.org/changeset/115240
     5        https://bugs.webkit.org/show_bug.cgi?id=84928
     6
     7        It broke everything (Requested by Ossy_HOME on #webkit).
     8
     9        * Scripts/webkitpy/layout_tests/port/gtk.py:
     10        (GtkDriver):
     11        (GtkDriver._start):
     12        (GtkDriver._start.x_filter):
     13        (GtkDriver.stop):
     14        (GtkPort._driver_class):
     15        * Scripts/webkitpy/layout_tests/port/qt.py:
     16        (QtPort._build_driver):
     17        * Scripts/webkitpy/layout_tests/port/xvfbdriver.py: Removed.
     18
    1192012-04-25  Dirk Pranke  <dpranke@chromium.org>
    220
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py

    r115240 r115286  
    3333
    3434from webkitpy.layout_tests.models.test_configuration import TestConfiguration
    35 from webkitpy.layout_tests.port.webkit import WebKitPort
    36 from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
     35from webkitpy.layout_tests.port.server_process import ServerProcess
     36from webkitpy.layout_tests.port.webkit import WebKitDriver, WebKitPort
     37from webkitpy.common.system.executive import Executive
    3738
    3839_log = logging.getLogger(__name__)
     40
     41
     42class GtkDriver(WebKitDriver):
     43    def _start(self, pixel_tests, per_test_args):
     44
     45        # Collect the number of X servers running already and make
     46        # sure our Xvfb process doesn't clash with any of them.
     47        def x_filter(process_name):
     48            return process_name.find("Xorg") > -1
     49
     50        running_displays = len(Executive().running_pids(x_filter))
     51
     52        # Use even displays for pixel tests and odd ones otherwise. When pixel tests are disabled,
     53        # DriverProxy creates two drivers, one for normal and the other for ref tests. Both have
     54        # the same worker number, so this prevents them from using the same Xvfb instance.
     55        display_id = self._worker_number * 2 + running_displays
     56        if self._port.get_option('pixel_tests'):
     57            display_id += 1
     58        run_xvfb = ["Xvfb", ":%d" % (display_id), "-screen",  "0", "800x600x24", "-nolisten", "tcp"]
     59        with open(os.devnull, 'w') as devnull:
     60            self._xvfb_process = subprocess.Popen(run_xvfb, stderr=devnull)
     61        server_name = self._port.driver_name()
     62        environment = self._port.setup_environ_for_server(server_name)
     63        # We must do this here because the DISPLAY number depends on _worker_number
     64        environment['DISPLAY'] = ":%d" % (display_id)
     65        self._crashed_process_name = None
     66        self._crashed_pid = None
     67        self._server_process = ServerProcess(self._port, server_name, self.cmd_line(pixel_tests, per_test_args), environment)
     68
     69    def stop(self):
     70        WebKitDriver.stop(self)
     71        if getattr(self, '_xvfb_process', None):
     72            # FIXME: This should use Executive.kill_process
     73            os.kill(self._xvfb_process.pid, signal.SIGTERM)
     74            self._xvfb_process.wait()
     75            self._xvfb_process = None
    3976
    4077
     
    4683
    4784    def _driver_class(self):
    48         return XvfbDriver
     85        return GtkDriver
    4986
    5087    def _unload_pulseaudio_module(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py

    r115240 r115286  
    3939from webkitpy.layout_tests.models.test_configuration import TestConfiguration
    4040from webkitpy.layout_tests.port.webkit import WebKitPort
    41 from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
     41
    4242
    4343_log = logging.getLogger(__name__)
     
    8181        # The Qt port builds DRT as part of the main build step
    8282        return True
    83 
    84     def _driver_class(self):
    85         return XvfbDriver
    8683
    8784    def _path_to_driver(self):
Note: See TracChangeset for help on using the changeset viewer.