Esempio n. 1
0
from recipe_engine.config import config_item_context, ConfigGroup
from recipe_engine.config import Single
from recipe_engine.config_types import Path

def BaseConfig(**_kwargs):
  return ConfigGroup(
    install_emulator_deps_path = Single(Path),
    avd_script_path = Single(Path),
  )

config_ctx = config_item_context(BaseConfig)

@config_ctx()
def base_config(c):
  c.install_emulator_deps_path = Path('[CHECKOUT]', 'build', 'android',
                                      'install_emulator_deps.py')
  c.avd_script_path = Path('[CHECKOUT]', 'build', 'android', 'avd.py')
Esempio n. 2
0
                                 required=False,
                                 hidden=True),

        # Check out refs/tags.
        with_tags=Single(bool, empty_val=False, required=False, hidden=True),
        disable_syntax_validation=Single(bool, empty_val=False,
                                         required=False),
        USE_MIRROR=Static(bool(USE_MIRROR)),
        # TODO(tandrii): remove PATCH_PROJECT field.
        # DON'T USE THIS. WILL BE REMOVED.
        PATCH_PROJECT=Static(str(PATCH_PROJECT), hidden=True),
        BUILDSPEC_VERSION=Static(BUILDSPEC_VERSION, hidden=True),
    )


config_ctx = config_item_context(BaseConfig)


def ChromiumGitURL(_c, *pieces):
    return '/'.join(('https://chromium.googlesource.com', ) + pieces)


# TODO(phajdan.jr): Move to proper repo and add coverage.
def ChromeInternalGitURL(_c, *pieces):  # pragma: no cover
    return '/'.join(('https://chrome-internal.googlesource.com', ) + pieces)


@config_ctx()
def disable_syntax_validation(c):
    c.disable_syntax_validation = True