Changeset 128020 in webkit
- Timestamp:
- Sep 9, 2012 11:54:43 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r127991 r128020 1 2012-09-09 Zan Dobersek <zandobersek@gmail.com> 2 3 Clean up the code in XvfbDriver 4 https://bugs.webkit.org/show_bug.cgi?id=96202 5 6 Reviewed by Philippe Normand. 7 8 Changes: 9 - Remove unneeded imports, 10 - assign the _lock_file member variable when the display number is determined, 11 - no need for parentheses around a single string format argument, 12 - use FileSystem.exists method when checking if lock file is present as it 13 makes the intention much more clearer. 14 15 * Scripts/webkitpy/layout_tests/port/xvfbdriver.py: 16 (XvfbDriver._start): 17 (XvfbDriver.stop): 18 1 19 2012-09-09 Patrick Gansterer <paroga@webkit.org> 2 20 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py
r127849 r128020 29 29 import logging 30 30 import os 31 import signal32 import subprocess33 31 34 32 from webkitpy.layout_tests.port.server_process import ServerProcess 35 33 from webkitpy.layout_tests.port.driver import Driver 36 from webkitpy.common.system.executive import Executive37 34 38 35 _log = logging.getLogger(__name__) … … 55 52 if pixel_tests: 56 53 display_id += 1 54 self._lock_file = "/tmp/.X%d-lock" % display_id 55 57 56 run_xvfb = ["Xvfb", ":%d" % display_id, "-screen", "0", "800x600x24", "-nolisten", "tcp"] 58 57 with open(os.devnull, 'w') as devnull: 59 58 self._xvfb_process = self._port.host.executive.popen(run_xvfb, stderr=devnull) 60 self._lock_file = "/tmp/.X%d-lock" % display_id61 59 62 60 server_name = self._port.driver_name() 63 61 environment = self._port.setup_environ_for_server(server_name) 64 62 # We must do this here because the DISPLAY number depends on _worker_number 65 environment['DISPLAY'] = ":%d" % (display_id) 63 environment['DISPLAY'] = ":%d" % display_id 64 66 65 self._crashed_process_name = None 67 66 self._crashed_pid = None … … 74 73 self._port.host.executive.kill_process(self._xvfb_process.pid) 75 74 self._xvfb_process = None 76 if self._port.host.filesystem. isfile(self._lock_file):75 if self._port.host.filesystem.exists(self._lock_file): 77 76 self._port.host.filesystem.remove(self._lock_file)
Note: See TracChangeset
for help on using the changeset viewer.