def _set_nacl_resource_permission(executor):
  # On Windows, NaCl cannot open resources without executable bit.
  # So, here, we manually set it regardless of the original permissions.
  resource_path = 'out/target/%s/runtime/_platform_specific/%s/' % (
      build_common.get_target_dir_name(),
      OPTIONS.target())
  executor.run(' '.join([
      'cd', executor.get_remote_arc_root(), '&&',
      'chmod', '-R', 'a+x', resource_path]))
def _set_nacl_resource_permission(executor):
    # On Windows, NaCl cannot open resources without executable bit.
    # So, here, we manually set it regardless of the original permissions.
    resource_path = 'out/target/%s/runtime/_platform_specific/%s/' % (
        build_common.get_target_dir_name(), OPTIONS.target())
    executor.run(' '.join([
        'cd',
        executor.get_remote_arc_root(), '&&', 'chmod', '-R', 'a+x',
        resource_path
    ]))
Exemple #3
0
def handle_stash(parsed_args):
  """The entry point for stash command.

  Args:
    parsed_args: An argparse.Namespace object.
  """
  arc_root = get_abs_arc_root()
  stash_root = get_abs_stash_root()

  check_current_configure_options(parsed_args)

  options = load_configure_options(arc_root)
  logging.info('options: %s', options)
  if parsed_args.run_ninja:
    build_common.run_ninja()

  # See FILTER RULES section in rsync manpages for syntax.
  rules_text = """
  # No git repo.
  - .git/
  # Artifacts for the target arch and common.
  + /{out}/target/{target}/runtime/
  + /{out}/target/{target}/unittest_info/
  - /{out}/target/{target}/*
  + /{out}/target/{target}/
  + /{out}/target/common/
  - /{out}/target/*
  - /{out}/staging/
  # No internal-apks build artifacts.
  - /{out}/gms-core-build/
  - /{out}/google-contacts-sync-adapter-build/
  + /{out}/
  + /src/
  # aapt etc.
  + /third_party/android-sdk/
  # ninja etc.
  + /third_party/tools/ninja/
  + /third_party/tools/crosutils/mod_for_test_scripts/ssh_keys/
  - /third_party/tools/crosutils/mod_for_test_scripts/*
  + /third_party/tools/crosutils/mod_for_test_scripts/
  - /third_party/tools/crosutils/*
  + /third_party/tools/crosutils/
  - /third_party/tools/*
  + /third_party/tools/
  - /third_party/*
  + /third_party/
  + /launch_chrome
  - /*
  """.format(
      out=build_common.OUT_DIR,
      target=build_common.get_target_dir_name())

  rules = []
  for line in rules_text.strip().splitlines():
    line = line.strip()
    if line and not line.startswith('#'):
      rules.append(line)

  args = ['rsync', '-a', '--delete', '--delete-excluded', '--copy-links']
  if parsed_args.verbose:
    args.append('-v')
  args.extend(['--filter=%s' % rule for rule in rules])
  # A trailing dot is required to make rsync work as we expect.
  args.extend([os.path.join(arc_root, '.'), stash_root])

  logging.info(
      'running rsync to copy the arc tree to %s. please be patient...',
      stash_root)
  subprocess.check_call(args)

  logging.info('stashed the arc tree at %s.', stash_root)
Exemple #4
0
def handle_stash(parsed_args):
    """The entry point for stash command.

  Args:
    parsed_args: An argparse.Namespace object.
  """
    arc_root = get_abs_arc_root()
    stash_root = get_abs_stash_root()

    check_current_configure_options(parsed_args)

    options = load_configure_options(arc_root)
    logging.info('options: %s', options)
    if parsed_args.run_ninja:
        build_common.run_ninja()

    # See FILTER RULES section in rsync manpages for syntax.
    rules_text = """
  # No git repo.
  - .git/
  # Artifacts for the target arch and common.
  + /{out}/target/{target}/runtime/
  + /{out}/target/{target}/unittest_info/
  - /{out}/target/{target}/*
  + /{out}/target/{target}/
  + /{out}/target/common/
  - /{out}/target/*
  - /{out}/staging/
  # No internal-apks build artifacts.
  - /{out}/gms-core-build/
  - /{out}/google-contacts-sync-adapter-build/
  + /{out}/
  + /src/
  # aapt etc.
  + /third_party/android-sdk/
  # ninja etc.
  + /third_party/tools/ninja/
  + /third_party/tools/crosutils/mod_for_test_scripts/ssh_keys/
  - /third_party/tools/crosutils/mod_for_test_scripts/*
  + /third_party/tools/crosutils/mod_for_test_scripts/
  - /third_party/tools/crosutils/*
  + /third_party/tools/crosutils/
  - /third_party/tools/*
  + /third_party/tools/
  - /third_party/*
  + /third_party/
  + /launch_chrome
  - /*
  """.format(out=build_common.OUT_DIR,
             target=build_common.get_target_dir_name())

    rules = []
    for line in rules_text.strip().splitlines():
        line = line.strip()
        if line and not line.startswith('#'):
            rules.append(line)

    args = ['rsync', '-a', '--delete', '--delete-excluded', '--copy-links']
    if parsed_args.verbose:
        args.append('-v')
    args.extend(['--filter=%s' % rule for rule in rules])
    # A trailing dot is required to make rsync work as we expect.
    args.extend([os.path.join(arc_root, '.'), stash_root])

    logging.info(
        'running rsync to copy the arc tree to %s. please be patient...',
        stash_root)
    subprocess.check_call(args)

    logging.info('stashed the arc tree at %s.', stash_root)