Changeset 121239 in webkit
- Timestamp:
- Jun 26, 2012 1:25:11 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r121236 r121239 1 2012-06-26 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r121236. 4 http://trac.webkit.org/changeset/121236 5 https://bugs.webkit.org/show_bug.cgi?id=89956 6 7 It's broke the nrwt on qt and gtk platform (Requested by 8 kkristof on #webkit). 9 10 * Scripts/webkitpy/layout_tests/port/qt.py: 11 (QtPort._build_driver): 12 * Scripts/webkitpy/layout_tests/port/xvfbdriver.py: 13 (XvfbDriver._start): 14 (XvfbDriver._start.x_filter): 15 (XvfbDriver.stop): 16 1 17 2012-06-26 Kristóf Kosztyó <kkristof@inf.u-szeged.hu> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py
r121236 r121239 81 81 # The Qt port builds DRT as part of the main build step 82 82 return True 83 84 def _driver_class(self):85 return XvfbDriver86 83 87 84 def _path_to_driver(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py
r121236 r121239 35 35 from webkitpy.layout_tests.port.webkit import WebKitDriver 36 36 from webkitpy.common.system.executive import Executive 37 from webkitpy.common.system.file_lock import FileLock38 from webkitpy.common.system.filesystem import FileSystem39 37 40 38 _log = logging.getLogger(__name__) … … 42 40 43 41 class XvfbDriver(WebKitDriver): 44 def __init__(self, *args, **kwargs):45 WebKitDriver.__init__(self, *args, **kwargs)46 self._guard_lock = None47 48 42 def _start(self, pixel_tests, per_test_args): 49 43 50 def next_free_id(): 51 for i in range(99): 52 if not os.path.exists('/tmp/.X%d-lock' % i): 53 self._guard_lock = FileLock(self._port._filesystem.join('/tmp', 'WebKitXvfb.lock.%i' % i)) 54 if self._guard_lock.acquire_lock(): 55 return i 44 # Collect the number of X servers running already and make 45 # sure our Xvfb process doesn't clash with any of them. 46 def x_filter(process_name): 47 return process_name.find("Xorg") > -1 56 48 57 self._display_id = next_free_id() 58 _log.debug('Start new xvfb with id %d for worker/%d' % (self._display_id, self._worker_number)) 59 run_xvfb = ["Xvfb", ":%d" % (self._display_id), "-screen", "0", "800x600x24", "-nolisten", "tcp"] 49 running_displays = len(Executive().running_pids(x_filter)) 50 51 # Use even displays for pixel tests and odd ones otherwise. When pixel tests are disabled, 52 # DriverProxy creates two drivers, one for normal and the other for ref tests. Both have 53 # the same worker number, so this prevents them from using the same Xvfb instance. 54 display_id = self._worker_number * 2 + running_displays 55 if pixel_tests: 56 display_id += 1 57 run_xvfb = ["Xvfb", ":%d" % (display_id), "-screen", "0", "800x600x24", "-nolisten", "tcp"] 60 58 with open(os.devnull, 'w') as devnull: 61 59 self._xvfb_process = subprocess.Popen(run_xvfb, stderr=devnull) 62 self._driver_tempdir = self._port._filesystem.mkdtemp(prefix='%s-' % self._port.driver_name())63 60 server_name = self._port.driver_name() 64 61 environment = self._port.setup_environ_for_server(server_name) 65 62 # We must do this here because the DISPLAY number depends on _worker_number 66 environment['DISPLAY'] = ":%d" % (self._display_id) 67 environment['DYLD_LIBRARY_PATH'] = self._port._build_path() 68 environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path() 69 # FIXME: We're assuming that WebKitTestRunner checks this DumpRenderTree-named environment variable. 70 environment['DUMPRENDERTREE_TEMP'] = str(self._driver_tempdir) 71 environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir() 63 environment['DISPLAY'] = ":%d" % (display_id) 72 64 self._crashed_process_name = None 73 65 self._crashed_pid = None … … 76 68 def stop(self): 77 69 WebKitDriver.stop(self) 78 if self._guard_lock:79 self._guard_lock.release_lock()80 self._guard_lock = None81 70 if getattr(self, '_xvfb_process', None): 82 71 try:
Note: See TracChangeset
for help on using the changeset viewer.