def _determine_driver_path_statically(cls, host, options): config_object = config.Config(host.executive, host.filesystem) build_directory = getattr(options, 'build_directory', None) webkit_base = config_object.path_from_webkit_base() chromium_base = cls._chromium_base_dir(host.filesystem) if hasattr(options, 'configuration') and options.configuration: configuration = options.configuration else: configuration = config_object.default_configuration() return cls._static_build_path(host.filesystem, build_directory, chromium_base, webkit_base, configuration, ['DumpRenderTree'])
def _determine_driver_path_statically(cls, host, options): config_object = config.Config(host.executive, host.filesystem) build_directory = getattr(options, 'build_directory', None) finder = WebKitFinder(host.filesystem) webkit_base = finder.webkit_base() chromium_base = finder.chromium_base() driver_name = getattr(options, 'driver_name', None) if driver_name is None: driver_name = cls.CONTENT_SHELL_NAME if hasattr(options, 'configuration') and options.configuration: configuration = options.configuration else: configuration = config_object.default_configuration() return cls._static_build_path(host.filesystem, build_directory, chromium_base, configuration, [driver_name])
def __init__(self, port_name=None, options=None, executive=None, user=None, filesystem=None, config=None, **kwargs): # These are default values that should be overridden in a subclasses. self._name = port_name or self.port_name # Subclasses may append a -VERSION (like mac-leopard) or other qualifiers. self._operating_system = 'mac' self._version = '' self._architecture = 'x86' self._graphics_type = 'cpu' # FIXME: Ideally we'd have a package-wide way to get a # well-formed options object that had all of the necessary # options defined on it. self.options = options or DummyOptions() self.executive = executive or Executive() self.user = user or User() self.filesystem = filesystem or system.filesystem.FileSystem() self.config = config or port_config.Config(self.executive, self.filesystem) # FIXME: Remove all of the old "protected" versions when we can. self._options = self.options self._executive = self.executive self._filesystem = self.filesystem self._user = self.user self._config = self.config self._helper = None self._http_server = None self._websocket_server = None self._http_lock = None # FIXME: Why does this live on the port object? # Python's Popen has a bug that causes any pipes opened to a # process that can't be executed to be leaked. Since this # code is specifically designed to tolerate exec failures # to gracefully handle cases where wdiff is not installed, # the bug results in a massive file descriptor leak. As a # workaround, if an exec failure is ever experienced for # wdiff, assume it's not available. This will leak one # file descriptor but that's better than leaking each time # wdiff would be run. # # http://mail.python.org/pipermail/python-list/ # 2008-August/505753.html # http://bugs.python.org/issue3210 self._wdiff_available = None # FIXME: prettypatch.py knows this path, why is it copied here? self._pretty_patch_path = self.path_from_webkit_base( "Websites", "bugs.webkit.org", "PrettyPatch", "prettify.rb") self._pretty_patch_available = None self.set_option_default('configuration', self.default_configuration()) self._test_configuration = None self._multiprocessing_is_available = (multiprocessing is not None) self._results_directory = None