Changeset 116212 in webkit


Ignore:
Timestamp:
May 5, 2012 12:34:50 AM (12 years ago)
Author:
zandobersek@gmail.com
Message:

[Gtk] GtkDriver is not required anymore after r116134
https://bugs.webkit.org/show_bug.cgi?id=85699

Reviewed by Csaba Osztrogonác.

Remove GtkDriver as it was replaced by the XvfbDriver and is
no longer needed.

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

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r116211 r116212  
     12012-05-05  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [Gtk] GtkDriver is not required anymore after r116134
     4        https://bugs.webkit.org/show_bug.cgi?id=85699
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        Remove GtkDriver as it was replaced by the XvfbDriver and is
     9        no longer needed.
     10
     11        * Scripts/webkitpy/layout_tests/port/gtk.py:
     12
    1132012-05-05  Zan Dobersek  <zandobersek@gmail.com>
    214
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py

    r116134 r116212  
    3838from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
    3939from webkitpy.common.system.executive import Executive
    40 
    41 
    42 class 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 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
    76 
    7740
    7841class GtkPort(WebKitPort, PulseAudioSanitizer):
Note: See TracChangeset for help on using the changeset viewer.