Exemplo n.º 1
0
    def __init__(self, options, tempdir, staging_dir):
        """Initialize the class.

    Args:
      options: options object.
      tempdir: Scratch space for the class.  Caller has responsibility to clean
        it up.
      staging_dir: Directory to stage the files to.
    """
        self.tempdir = tempdir
        self.options = options
        self.staging_dir = staging_dir
        if not self.options.staging_only:
            if options.device:
                hostname = options.device.hostname
                port = options.device.port
            else:
                hostname = options.to
                port = options.port
            self.device = remote.ChromiumOSDevice(
                hostname,
                port=port,
                ping=options.ping,
                private_key=options.private_key,
                include_dev_paths=False)
        self._root_dir_is_still_readonly = multiprocessing.Event()

        self._deployment_name = 'lacros' if options.lacros else 'chrome'
        self.copy_paths = chrome_util.GetCopyPaths(self._deployment_name)

        self.chrome_dir = LACROS_DIR if self.options.lacros else _CHROME_DIR

        # Whether UI was stopped during setup.
        self._stopped_ui = False
Exemplo n.º 2
0
    def _CheckDeployType(self):
        if self.options.build_dir:

            def BinaryExists(filename):
                """Checks if the passed-in file is present in the build directory."""
                return os.path.exists(
                    os.path.join(self.options.build_dir, filename))

            # Handle non-Chrome deployments.
            if not BinaryExists('chrome'):
                if BinaryExists('envoy_shell'):
                    self.copy_paths = chrome_util.GetCopyPaths('envoy')
                elif BinaryExists('app_shell'):
                    self.copy_paths = chrome_util.GetCopyPaths('app_shell')

                # TODO(derat): Update _Deploy() and remove this after figuring out how
                # {app,envoy}_shell should be executed.
                self.options.startui = False
Exemplo n.º 3
0
    def __init__(self, options, tempdir, staging_dir):
        """Initialize the class.

    Args:
      options: options object.
      tempdir: Scratch space for the class.  Caller has responsibility to clean
        it up.
      staging_dir: Directory to stage the files to.
    """
        self.tempdir = tempdir
        self.options = options
        self.staging_dir = staging_dir
        if not self.options.staging_only:
            self.device = remote.RemoteDevice(options.to,
                                              port=options.port,
                                              ping=options.ping)
        self._target_dir_is_still_readonly = multiprocessing.Event()

        if self.options.mash:
            self.copy_paths = chrome_util.GetCopyPaths('mash')
        else:
            self.copy_paths = chrome_util.GetCopyPaths('chrome')
        self.chrome_dir = _CHROME_DIR
Exemplo n.º 4
0
    def _CheckDeployType(self):
        if self.options.build_dir:

            def BinaryExists(filename):
                """Checks if the passed-in file is present in the build directory."""
                return os.path.exists(
                    os.path.join(self.options.build_dir, filename))

            # In the future, lacros-chrome and ash-chrome will likely be named
            # something other than 'chrome' to avoid confusion.
            # Handle non-Chrome deployments.
            if not BinaryExists('chrome'):
                if BinaryExists('app_shell'):
                    self.copy_paths = chrome_util.GetCopyPaths('app_shell')