示例#1
0
def BaseConfig(**_kwargs):
    def render_cmd(lst):
        return [(x if isinstance(x, Placeholder) else str(x)) for x in lst]

    return ConfigGroup(
        # For compatibility with buildbot, the step name must be ascii, which is why
        # this is a 'str' and not a 'basestring'.
        name=Single(str),
        cmd=List(inner_type=(int, basestring, Path, Placeholder),
                 jsonish_fn=render_cmd),

        # optional
        env=Dict(item_fn=lambda (k, v): (k, v if v is None else str(v)),
                 value_type=(basestring, int, Path, type(None))),
        cwd=Single(Path, jsonish_fn=str, required=False),
        stdout=Single(Placeholder, required=False),
        stderr=Single(Placeholder, required=False),
        stdin=Single(Placeholder, required=False),
        allow_subannotations=Single(bool, required=False),
        trigger_specs=ConfigList(
            lambda: ConfigGroup(
                bucket=Single(basestring),
                builder_name=Single(basestring),
                properties=Dict(value_type=object),
                buildbot_changes=List(dict),
            ), ),
        step_test_data=Single(collections.Callable, required=False),
        ok_ret=Set(int),
        infra_step=Single(bool, required=False),
        step_nest_level=Single(int, required=False),
    )
示例#2
0
def BaseConfig(INTERNAL=False,
               REPO_NAME=None,
               REPO_URL=None,
               BUILD_CONFIG='Debug',
               REVISION='',
               **_kwargs):
    return ConfigGroup(
        INTERNAL=Static(INTERNAL),
        REPO_NAME=Static(REPO_NAME),
        REPO_URL=Static(REPO_URL),
        BUILD_CONFIG=Static(BUILD_CONFIG),
        revision=Single(basestring, empty_val=REVISION),
        revisions=Dict(value_type=(basestring, types.NoneType)),
        asan_symbolize=Single(bool, required=False, empty_val=False),
        get_app_manifest_vars=Single(bool, required=False, empty_val=True),
        run_tree_truth=Single(bool, required=False, empty_val=True),
        deps_file=Single(basestring, required=False, empty_val='.DEPS.git'),
        internal_dir_name=Single(basestring, required=False),
        # deps_dir: where to checkout the gclient deps file
        deps_dir=Single(basestring, required=False, empty_val=REPO_NAME),
        managed=Single(bool, required=False, empty_val=True),
        extra_deploy_opts=List(inner_type=basestring),
        tests=List(inner_type=basestring),
        cr_build_android=Static(Path('[CHECKOUT]', 'build', 'android')),
        test_runner=Single(Path),
        gclient_custom_deps=Dict(value_type=(basestring, types.NoneType)),
        channel=Single(basestring, empty_val='chrome'),
        gclient_custom_vars=Dict(value_type=(basestring, types.NoneType)),
        coverage=Single(bool, required=False, empty_val=False),
        chrome_specific_wipe=Single(bool, required=False, empty_val=False),
        incremental_coverage=Single(bool, required=False, empty_val=False),
        env=ConfigGroup(LLVM_FORCE_HEAD_REVISION=Single(basestring,
                                                        required=False), ),
    )
示例#3
0
文件: config.py 项目: bopopescu/build
def BaseConfig(**_kwargs):
    shard_count = _kwargs.get('SHARD_COUNT', 1)
    shard_run = _kwargs.get('SHARD_RUN', 1)
    assert shard_count >= 1
    assert shard_run >= 1
    assert shard_run <= shard_count

    return ConfigGroup(
        gyp_env=ConfigGroup(
            AR=Single(basestring, required=False),
            CC=Single(basestring, required=False),
            CXX=Single(basestring, required=False),
            CXX_host=Single(basestring, required=False),
            LINK=Single(basestring, required=False),
            RANLIB=Single(basestring, required=False),
        ),
        mips_cross_compile=Single(bool, empty_val=False, required=False),
        # Test configuration that is the equal for all tests of a builder. It
        # might be refined later in the test runner for distinct tests.
        testing=ConfigGroup(
            test_args=List(basestring),
            may_shard=Single(bool, empty_val=True, required=False),
            SHARD_COUNT=Static(shard_count),
            SHARD_RUN=Static(shard_run),
        ),
    )
示例#4
0
def BaseConfig(**_kwargs):
    return ConfigGroup(
        # Various config options to be exercised in tests.
        thedict=Dict(value_type=tuple),
        thelist=List(basestring),
        thestring=Single(basestring, required=True),
        thebool=Single(bool, required=False, empty_val=False),
        thesubconfig=ConfigGroup(
            thefloat=Single(float),
            thestaticint=Static(42, hidden=False),
        ),
    )
示例#5
0
def BaseConfig(CHECKOUT_PATH, **dummy_kwargs):
    return ConfigGroup(
        CHECKOUT_PATH=Static(CHECKOUT_PATH),
        official_build=Single(bool, empty_val=False, required=False),
        unittests_gypi=Single(Path, required=False),
        version_file=Single(Path, required=False),
    )
示例#6
0
def BaseConfig(PERF_ID=None, PERF_CONFIG=None, TEST_SUITE=None, **_kwargs):
    return ConfigGroup(
        PERF_ID=Static(PERF_ID),
        PERF_CONFIG=Static(PERF_CONFIG),
        TEST_SUITE=Static(TEST_SUITE),
        use_isolate=Single(bool, False),
    )
示例#7
0
def BaseConfig(CHECKOUT_PATH, **_kwargs):
    return ConfigGroup(
        install_emulator_deps_path=Static(
            CHECKOUT_PATH.join('build', 'android',
                               'install_emulator_deps.py')),
        avd_script_path=Static(CHECKOUT_PATH.join('build', 'android',
                                                  'avd.py')),
    )
示例#8
0
def BaseConfig(CHECKOUT_PATH, INTERNAL=False, REPO_NAME=None, REPO_URL=None,
               BUILD_CONFIG='Debug', REVISION='', asan_symbolize=False,
               **_kwargs):
  return ConfigGroup(
    CHECKOUT_PATH = Static(CHECKOUT_PATH),
    INTERNAL = Static(INTERNAL),
    REPO_NAME = Static(REPO_NAME),
    REPO_URL = Static(REPO_URL),
    BUILD_CONFIG = Static(BUILD_CONFIG),
    cs_base_url = Single(basestring, required=False, empty_val='http://cs.chromium.org'),
    results_bucket = Single(basestring, required=False, empty_val='chromium-result-details'),
    revision = Single(basestring, empty_val=REVISION),
    revisions = Dict(value_type=(basestring, types.NoneType)),
    asan_symbolize = Single(bool, required=False, empty_val=asan_symbolize),
    get_app_manifest_vars = Single(bool, required=False, empty_val=True),
    run_tree_truth = Single(bool, required=False, empty_val=True),
    deps_file = Single(basestring, required=False, empty_val='.DEPS.git'),
    internal_dir_name = Single(basestring, required=False),
    # deps_dir: where to checkout the gclient deps file
    deps_dir = Single(basestring, required=False, empty_val=REPO_NAME),
    managed = Single(bool, required=False, empty_val=True),
    extra_deploy_opts = List(inner_type=basestring),
    tests = List(inner_type=basestring),
    cr_build_android = Static(CHECKOUT_PATH.join('build', 'android')),
    test_runner = Single(Path),
    gclient_custom_deps = Dict(value_type=(basestring, types.NoneType)),
    channel = Single(basestring, empty_val='chrome'),
    gclient_custom_vars = Dict(value_type=(basestring, types.NoneType)),
    coverage = Single(bool, required=False, empty_val=False),
    chrome_specific_wipe = Single(bool, required=False, empty_val=False),
    incremental_coverage = Single(bool, required=False, empty_val=False),
    env = ConfigGroup(
      LLVM_FORCE_HEAD_REVISION = Single(basestring, required=False),
    ),
    restart_usb = Single(bool, required=False, empty_val=False),
    use_devil_adb = Single(bool, required=False, empty_val=False),
    # TODO(jbudorick): Remove this once everything has switched to devil
    # provisioning.
    use_devil_provision = Single(bool, required=False, empty_val=False),
    remove_system_packages = List(inner_type=basestring),
  )
示例#9
0
def BaseConfig(CURRENT_WORKING_DIR, TEMP_DIR, **_kwargs):
    assert CURRENT_WORKING_DIR[0].endswith(('\\', '/'))
    assert TEMP_DIR[0].endswith(('\\', '/'))
    return ConfigGroup(
        # base path name -> [tokenized absolute path]
        base_paths=Dict(value_type=tuple),

        # dynamic path name -> Path object (referencing one of the base_paths)
        dynamic_paths=Dict(value_type=(Path, type(None))),
        CURRENT_WORKING_DIR=Static(tuple(CURRENT_WORKING_DIR)),
        TEMP_DIR=Static(tuple(TEMP_DIR)),
    )
示例#10
0
def BaseConfig(USE_MIRROR=False):
    chromium_in_android_subpath = ('external', 'chromium_org')
    build_path = Path('[SLAVE_BUILD]', 'android-src')

    return ConfigGroup(
        lunch_flavor=Single(basestring),
        repo=ConfigGroup(
            url=Single(basestring),
            branch=Single(basestring),
            sync_flags=List(basestring),
        ),
        USE_MIRROR=Static(bool(USE_MIRROR)),
        # If present causes the sync step to use the specified manifest instead of
        # the one associated with the repo.branch.
        sync_manifest_override=Single(Path, required=False),

        # Path stuff
        chromium_in_android_subpath=Static(
            '/'.join(chromium_in_android_subpath)),
        build_path=Static(build_path),
        slave_chromium_in_android_path=Static(
            build_path.join(*chromium_in_android_subpath)),
        slave_android_out_path=Static(build_path.join('out')),
    )
示例#11
0
def BaseConfig(PLATFORM, START_DIR, TEMP_DIR, CACHE_DIR, CLEANUP_DIR,
               **_kwargs):
    assert START_DIR[0].endswith(('\\', '/')), START_DIR
    assert TEMP_DIR[0].endswith(('\\', '/')), TEMP_DIR
    assert CACHE_DIR[0].endswith(('\\', '/')), CACHE_DIR
    assert CLEANUP_DIR[0].endswith(('\\', '/')), CLEANUP_DIR
    return ConfigGroup(
        # base path name -> [tokenized absolute path]
        base_paths=Dict(value_type=tuple),

        # dynamic path name -> Path object (referencing one of the base_paths)
        dynamic_paths=Dict(value_type=(Path, type(None))),
        PLATFORM=Static(PLATFORM),
        START_DIR=Static(tuple(START_DIR)),
        TEMP_DIR=Static(tuple(TEMP_DIR)),
        CACHE_DIR=Static(tuple(CACHE_DIR)),
        CLEANUP_DIR=Static(tuple(CLEANUP_DIR)),
    )
示例#12
0
    'recipe_engine/path',
    'recipe_engine/platform',
    'recipe_engine/step',
    'recipe_engine/version',
]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
    '$depot_tools/osx_sdk':
    Property(
        help='Properties specifically for the infra osx_sdk module.',
        param_name='sdk_properties',
        kind=ConfigGroup(  # pylint: disable=line-too-long
            # XCode build version number. Internally maps to an XCode build id like
            # '9c40b'. See
            #
            #   https://chrome-infra-packages.appspot.com/p/infra_internal/ios/xcode/mac/+/
            #
            # For an up to date list of the latest SDK builds.
            sdk_version=Single(str),

            # The CIPD toolchain tool package and version
            toolchain_pkg=Single(str),
            toolchain_ver=Single(str),
        ),
        default={},
    )
}
示例#13
0
def BaseConfig(USE_MIRROR=True,
               GIT_MODE=False,
               CACHE_DIR=None,
               PATCH_PROJECT=None,
               BUILDSPEC_VERSION=None,
               **_kwargs):
    deps = '.DEPS.git' if GIT_MODE else 'DEPS'
    cache_dir = str(CACHE_DIR) if CACHE_DIR else None
    return ConfigGroup(
        solutions=ConfigList(lambda: ConfigGroup(
            name=Single(basestring),
            url=Single(basestring),
            deps_file=Single(
                basestring, empty_val=deps, required=False, hidden=False),
            managed=Single(bool, empty_val=True, required=False, hidden=False),
            custom_deps=Dict(value_type=(basestring, types.NoneType)),
            custom_vars=Dict(value_type=basestring),
            safesync_url=Single(basestring, required=False),
            revision=Single((basestring, gclient_api.RevisionResolver),
                            required=False,
                            hidden=True),
        )),
        deps_os=Dict(value_type=basestring),
        hooks=List(basestring),
        target_os=Set(basestring),
        target_os_only=Single(bool, empty_val=False, required=False),
        cache_dir=Static(cache_dir, hidden=False),

        # If supplied, use this as the source root (instead of the first solution's
        # checkout).
        src_root=Single(basestring, required=False, hidden=True),

        # Maps 'solution' -> build_property
        got_revision_mapping=Dict(hidden=True),

        # Addition revisions we want to pass in.  For now theres a duplication
        # of code here of setting custom vars AND passing in --revision. We hope
        # to remove custom vars later.
        revisions=Dict(value_type=(basestring, gclient_api.RevisionResolver),
                       hidden=True),

        # TODO(iannucci): HACK! The use of None here to indicate that we apply this
        #   to the solution.revision field is really terrible. I mostly blame
        #   gclient.
        # Maps 'parent_build_property' -> 'custom_var_name'
        # Maps 'parent_build_property' -> None
        # If value is None, the property value will be applied to
        # solutions[0].revision. Otherwise, it will be applied to
        # solutions[0].custom_vars['custom_var_name']
        parent_got_revision_mapping=Dict(hidden=True),
        delete_unversioned_trees=Single(bool, empty_val=True, required=False),

        # Maps patch_project to (solution/path, revision).
        #  - solution/path is then used to apply patches as patch root in
        #    bot_update.
        #  - if revision is given, it's passed verbatim to bot_update for
        #    corresponding dependency. Otherwise (ie None), the patch will be
        #    applied on top of version pinned in DEPS.
        # This is essentially a whitelist of which projects inside a solution
        # can be patched automatically by bot_update based on PATCH_PROJECT
        # property.
        # For example, bare chromium solution has this entry in patch_projects
        #     'angle/angle': ('src/third_party/angle', 'HEAD')
        # then a patch to Angle project can be applied to a chromium src's
        # checkout after first updating Angle's repo to its master's HEAD.
        patch_projects=Dict(value_type=tuple, hidden=True),

        # Check out refs/branch-heads.
        # TODO (machenbach): Only implemented for bot_update atm.
        with_branch_heads=Single(bool,
                                 empty_val=False,
                                 required=False,
                                 hidden=True),
        GIT_MODE=Static(bool(GIT_MODE)),
        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),
    )
示例#14
0
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

DEPS = [
    'recipe_engine/cipd',
    'recipe_engine/context',
    'recipe_engine/json',
    'recipe_engine/path',
    'recipe_engine/step',
]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
    '$depot_tools/windows_sdk':
    Property(
        help='Properties specifically for the infra windows_sdk module.',
        param_name='sdk_properties',
        kind=ConfigGroup(
            # CIPD instance ID, tag or ref for the Windows SDK version.
            version=Single(str), ),
        default={'version': 'uploaded:2018-06-13'},
    )
}
示例#15
0
    'path',
    'platform',
    'properties',
    'service_account',
    'step',
]

PROPERTIES = {
    'use_pkg':
    Property(default=False, kind=bool),
    'pkg_files':
    Property(default=(), kind=List(str)),
    'pkg_dirs':
    Property(default=(),
             kind=ConfigList(lambda: ConfigGroup(
                 path=Single(str),
                 exclusions=List(str),
             ))),
    'pkg_vars':
    Property(default=None, kind=dict),
    'ver_files':
    Property(default=(), kind=List(str)),
    'install_mode':
    Property(default=None),
    'refs':
    Property(default=['fake-ref-1', 'fake-ref-2'], kind=List(str)),
    'tags':
    Property(kind=dict,
             default={
                 'fake_tag_1': 'fake_value_1',
                 'fake_tag_2': 'fake_value_2'
             }),
示例#16
0
def BaseConfig(**_kwargs):
  return ConfigGroup(
      test_results_server = Single(basestring))
示例#17
0
def BaseConfig(PLATFORM='default'):
    return ConfigGroup(buildbucket_host=Single(str, required=True),
                       buildbucket_client_path=Single(str, required=True),
                       PLATFORM=Static(str(PLATFORM)))
示例#18
0
def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None,
               PATCH_PROJECT=None, BUILDSPEC_VERSION=None,
               **_kwargs):
  deps = '.DEPS.git' if GIT_MODE else 'DEPS'
  cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None
  return ConfigGroup(
    solutions = ConfigList(
      lambda: ConfigGroup(
        name = Single(basestring),
        url = Single(basestring),
        deps_file = Single(basestring, empty_val=deps, required=False,
                           hidden=False),
        managed = Single(bool, empty_val=True, required=False, hidden=False),
        custom_deps = Dict(value_type=(basestring, types.NoneType)),
        custom_vars = Dict(value_type=basestring),
        safesync_url = Single(basestring, required=False),

        revision = Single(
            (basestring, gclient_api.RevisionResolver),
            required=False, hidden=True),
      )
    ),
    deps_os = Dict(value_type=basestring),
    hooks = List(basestring),
    target_os = Set(basestring),
    target_os_only = Single(bool, empty_val=False, required=False),
    cache_dir = Static(cache_dir, hidden=False),

    # If supplied, use this as the source root (instead of the first solution's
    # checkout).
    src_root = Single(basestring, required=False, hidden=True),

    # Maps 'solution' -> build_property
    got_revision_mapping = Dict(hidden=True),

    # Addition revisions we want to pass in.  For now theres a duplication
    # of code here of setting custom vars AND passing in --revision. We hope
    # to remove custom vars later.
    revisions = Dict(
        value_type=(basestring, gclient_api.RevisionResolver),
        hidden=True),

    # TODO(iannucci): HACK! The use of None here to indicate that we apply this
    #   to the solution.revision field is really terrible. I mostly blame
    #   gclient.
    # Maps 'parent_build_property' -> 'custom_var_name'
    # Maps 'parent_build_property' -> None
    # If value is None, the property value will be applied to
    # solutions[0].revision. Otherwise, it will be applied to
    # solutions[0].custom_vars['custom_var_name']
    parent_got_revision_mapping = Dict(hidden=True),
    delete_unversioned_trees = Single(bool, empty_val=True, required=False),

    # Check out refs/branch-heads.
    # TODO (machenbach): Only implemented for bot_update atm.
    with_branch_heads = Single(
        bool,
        empty_val=False,
        required=False,
        hidden=True),

    GIT_MODE = Static(bool(GIT_MODE)),
    USE_MIRROR = Static(bool(USE_MIRROR)),
    PATCH_PROJECT = Static(str(PATCH_PROJECT), hidden=True),
    BUILDSPEC_VERSION= Static(BUILDSPEC_VERSION, hidden=True),
  )
示例#19
0
def BaseConfig(HOST_PLATFORM, HOST_ARCH, HOST_BITS, TARGET_PLATFORM,
               TARGET_ARCH, TARGET_BITS, BUILD_CONFIG, TARGET_CROS_BOARD,
               BUILD_PATH, CHECKOUT_PATH, **_kwargs):
    equal_fn = lambda tup: ('%s=%s' % (tup[0], pipes.quote(str(tup[1]))))
    return ConfigGroup(
        compile_py=ConfigGroup(
            default_targets=Set(basestring),
            build_args=List(basestring),
            compiler=Single(basestring, required=False),
            mode=Single(basestring, required=False),
            goma_dir=Single(Path, required=False),
            goma_canary=Single(bool, empty_val=False, required=False),
            show_ninja_stats=Single(bool, empty_val=False, required=False),
            goma_hermetic=Single(basestring, required=False),
            goma_enable_remote_link=Single(bool,
                                           empty_val=False,
                                           required=False),
            goma_store_local_run_output=Single(bool,
                                               empty_val=False,
                                               required=False),
            goma_failfast=Single(bool, empty_val=False, required=False),
            goma_max_active_fail_fallback_tasks=Single(int,
                                                       empty_val=None,
                                                       required=False),
            goma_enable_localoutputcache=Single(bool,
                                                empty_val=False,
                                                required=False),
            xcode_sdk=Single(basestring, required=False),
            ninja_confirm_noop=Single(bool, empty_val=False, required=False),
            set_build_data_dir=Single(bool, empty_val=False, required=False),
            goma_high_parallel=Single(bool, empty_val=False, required=False),
        ),
        runtest_py=ConfigGroup(src_side=Single(bool), ),
        gyp_env=ConfigGroup(
            DOWNLOAD_VR_TEST_APKS=Single(int, required=False),
            GYP_CROSSCOMPILE=Single(int, jsonish_fn=str, required=False),
            GYP_CHROMIUM_NO_ACTION=Single(int, jsonish_fn=str, required=False),
            GYP_DEFINES=Dict(equal_fn, ' '.join, (basestring, int, Path)),
            GYP_GENERATORS=Set(basestring, ','.join),
            GYP_GENERATOR_FLAGS=Dict(equal_fn, ' '.join, (basestring, int)),
            GYP_INCLUDE_LAST=Single(Path, required=False),
            GYP_LINK_CONCURRENCY=Single(int, required=False),
            GYP_MSVS_VERSION=Single(basestring, required=False),
            GYP_USE_SEPARATE_MSPDBSRV=Single(int,
                                             jsonish_fn=str,
                                             required=False),
            LLVM_DOWNLOAD_GOLD_PLUGIN=Single(int, required=False),
        ),
        env=ConfigGroup(
            PATH=List(Path),
            ADB_VENDOR_KEYS=Single(Path, required=False),
            LLVM_FORCE_HEAD_REVISION=Single(basestring, required=False),
            GOMA_STUBBY_PROXY_IP_ADDRESS=Single(basestring, required=False),
            FORCE_MAC_TOOLCHAIN=Single(int, required=False),
            FORCE_MAC_TOOLCHAIN_REVISION_OVERRIDE=Single(basestring,
                                                         required=False),
        ),
        project_generator=ConfigGroup(
            tool=Single(basestring, empty_val='gyp'),
            args=Set(basestring),
        ),
        build_dir=Single(Path),
        cros_sdk=ConfigGroup(
            external=Single(bool, empty_val=True, required=False),
            args=List(basestring),
        ),
        runtests=ConfigGroup(
            enable_memcheck=Single(bool, empty_val=False, required=False),
            memory_tests_runner=Single(Path),
            enable_lsan=Single(bool, empty_val=False, required=False),
            test_args=List(basestring),
            run_asan_test=Single(bool, required=False),
            swarming_extra_args=List(basestring),
            swarming_tags=Set(basestring),
        ),

        # Some platforms do not have a 1:1 correlation of BUILD_CONFIG to what is
        # passed as --target on the command line.
        build_config_fs=Single(basestring),
        BUILD_CONFIG=Static(check(BUILD_CONFIG, BUILD_CONFIGS)),
        HOST_PLATFORM=Static(check(HOST_PLATFORM, HOST_PLATFORMS)),
        HOST_ARCH=Static(check(HOST_ARCH, HOST_ARCHS)),
        HOST_BITS=Static(check(HOST_BITS, HOST_TARGET_BITS)),
        TARGET_PLATFORM=Static(check(TARGET_PLATFORM, TARGET_PLATFORMS)),
        TARGET_ARCH=Static(check(TARGET_ARCH, TARGET_ARCHS)),
        TARGET_BITS=Static(check(TARGET_BITS, HOST_TARGET_BITS)),
        TARGET_CROS_BOARD=Static(TARGET_CROS_BOARD),
        BUILD_PATH=Static(BUILD_PATH),
        CHECKOUT_PATH=Static(CHECKOUT_PATH),
        gn_args=List(basestring),
        lto=Single(bool, empty_val=False, required=False),
        clobber_before_runhooks=Single(bool,
                                       empty_val=False,
                                       required=False,
                                       hidden=False),
    )
示例#20
0
文件: __init__.py 项目: frida/gn
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

DEPS = [
    'recipe_engine/cipd',
    'recipe_engine/context',
    'recipe_engine/json',
    'recipe_engine/path',
    'recipe_engine/platform',
    'recipe_engine/step',
]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
    '$gn/windows_sdk':
    Property(
        help='Properties specifically for the windows_sdk module.',
        param_name='sdk_properties',
        kind=ConfigGroup(
            # The CIPD package and version.
            sdk_package=Single(str),
            sdk_version=Single(str)),
        default={
            'sdk_package': 'chrome_internal/third_party/sdk/windows',
            'sdk_version': 'uploaded:2019-09-06'
        },
    )
}
def BaseConfig(**kwargs):
  return ConfigGroup(
    use_new_logic = Single(bool),
  )
def BaseConfig(CBB_CONFIG=None,
               CBB_BRANCH=None,
               CBB_BUILD_NUMBER=None,
               CBB_DEBUG=False,
               CBB_CLOBBER=False,
               **_kwargs):
    return ConfigGroup(
        # Base mapping of repository key to repository name.
        repositories=Dict(value_type=Set(basestring)),

        # Checkout Chromite at this branch. "origin/" will be prepended.
        chromite_branch=Single(basestring, empty_val=CBB_BRANCH or 'master'),

        # Should the Chrome version be supplied to cbuildbot?
        use_chrome_version=Single(bool),

        # Should the CrOS manifest commit message be parsed and added to 'cbuildbot'
        # flags?
        read_cros_manifest=Single(bool),
        cbb=ConfigGroup(
            # The Chromite configuration to use.
            config=Single(basestring, empty_val=CBB_CONFIG),

            # The buildroot directory name to use.
            builddir=Single(basestring),

            # If supplied, forward to cbuildbot as '--master-build-id'.
            build_id=Single(basestring),

            # If supplied, forward to cbuildbot as '--buildnumber'.
            build_number=Single(int, empty_val=CBB_BUILD_NUMBER),

            # If supplied, forward to cbuildbot as '--chrome-rev'.
            chrome_rev=Single(basestring),

            # If supplied, forward to cbuildbot as '--chrome_version'.
            chrome_version=Single(basestring),

            # If True, add cbuildbot flag: '--debug'.
            debug=Single(bool, empty_val=CBB_DEBUG),

            # If True, add cbuildbot flag: '--clobber'.
            clobber=Single(bool, empty_val=CBB_CLOBBER),

            # The (optional) configuration repository to use.
            config_repo=Single(basestring),

            # This disables Chromite bootstrapping by omitting the explicit "--branch"
            # argument.
            disable_bootstrap=Single(bool),

            # Whether this Chromite version supports warm cache.
            # https://chromium-review.googlesource.com/#/c/348011
            supports_repo_cache=Single(bool),
        ),

        # A list of branches whose Chromite version is "old". Old Chromite
        # buildbot commands reside in the "buildbot" subdirectory of the Chromite
        # repository instead of the "bin".
        old_chromite_branches=Set(basestring),

        # A list of branches whose builders should not use a shared buildroot.
        non_shared_root_branches=Set(basestring),

        # A list of branches whose builders checkout Chrome from SVN instead of Git.
        chrome_svn_branches=Set(basestring),

        # Directory where a warm repo cache is stored. If set, and if the current
        # build supports a warm cache, this will be used to bootstrap the Chromite
        # checkout.
        repo_cache_dir=Single(basestring))
示例#23
0
    'recipe_engine/path',
    'recipe_engine/platform',
    'recipe_engine/properties',
    'recipe_engine/python',
    'recipe_engine/raw_io',
    'recipe_engine/runtime',
    'recipe_engine/source_manifest',
    'recipe_engine/step',
    'tryserver',
]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
    # Gerrit patches will have all properties about them prefixed with patch_.
    'deps_revision_overrides':
    Property(default={}),
    'fail_patch':
    Property(default=None, kind=str),
    '$depot_tools/bot_update':
    Property(
        help='Properties specific to bot_update module.',
        param_name='properties',
        kind=ConfigGroup(
            # Whether we should do the patching in gclient instead of bot_update
            apply_patch_on_gclient=Single(bool), ),
        default={},
    ),
}
示例#24
0
# Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, List

DEPS = [
  "context",
  "path",
]

PROPERTIES = {
  '$recipe_engine/step': Property(
    help="Properties for the recipe_engine/step module",
    param_name="step_properties",
    kind=ConfigGroup(
      # A list of PATH elements to prefix onto the PATH for every step.
      prefix_path=List(str),
    ), default={
      'prefix_path': [],
    }),
}
示例#25
0
def BaseConfig(USE_MIRROR=True,
               CACHE_DIR=None,
               BUILDSPEC_VERSION=None,
               **_kwargs):
    cache_dir = str(CACHE_DIR) if CACHE_DIR else None
    return ConfigGroup(
        solutions=ConfigList(lambda: ConfigGroup(
            name=Single(basestring),
            url=Single((basestring, type(None)), empty_val=''),
            deps_file=Single(basestring,
                             empty_val='.DEPS.git',
                             required=False,
                             hidden=False),
            managed=Single(bool, empty_val=True, required=False, hidden=False),
            custom_deps=Dict(value_type=(basestring, types.NoneType)),
            custom_vars=Dict(value_type=(basestring, types.BooleanType)),
            safesync_url=Single(basestring, required=False),
            revision=Single((basestring, gclient_api.RevisionResolver),
                            required=False,
                            hidden=True),
        )),
        deps_os=Dict(value_type=basestring),
        hooks=List(basestring),
        target_os=Set(basestring),
        target_os_only=Single(bool, empty_val=False, required=False),
        target_cpu=Set(basestring),
        target_cpu_only=Single(bool, empty_val=False, required=False),
        cache_dir=Static(cache_dir, hidden=False),

        # If supplied, use this as the source root (instead of the first solution's
        # checkout).
        src_root=Single(basestring, required=False, hidden=True),

        # Maps 'solution' -> build_property
        # TODO(machenbach): Deprecate this in favor of the one below.
        # http://crbug.com/713356
        got_revision_mapping=Dict(hidden=True),

        # Maps build_property -> 'solution'
        got_revision_reverse_mapping=Dict(hidden=True),

        # Addition revisions we want to pass in.  For now theres a duplication
        # of code here of setting custom vars AND passing in --revision. We hope
        # to remove custom vars later.
        revisions=Dict(value_type=(basestring, gclient_api.RevisionResolver),
                       hidden=True),

        # TODO(iannucci): HACK! The use of None here to indicate that we apply this
        #   to the solution.revision field is really terrible. I mostly blame
        #   gclient.
        # Maps 'parent_build_property' -> 'custom_var_name'
        # Maps 'parent_build_property' -> None
        # If value is None, the property value will be applied to
        # solutions[0].revision. Otherwise, it will be applied to
        # solutions[0].custom_vars['custom_var_name']
        parent_got_revision_mapping=Dict(hidden=True),
        delete_unversioned_trees=Single(bool, empty_val=True, required=False),

        # Maps canonical repo URL to (local_path, revision).
        #  - canonical gitiles repo URL is "https://<host>/<project>"
        #    where project does not have "/a/" prefix or ".git" suffix.
        #  - solution/path is then used to apply patches as patch root in
        #    bot_update.
        #  - if revision is given, it's passed verbatim to bot_update for
        #    corresponding dependency. Otherwise (i.e. None), the patch will be
        #    applied on top of version pinned in DEPS.
        # This is essentially a whitelist of which repos inside a solution
        # can be patched automatically by bot_update based on
        # api.buildbucket.build.input.gerrit_changes[0].project
        # For example, if bare chromium solution has this entry in repo_path_map
        #     'http://103.210.161.2:3232/angle/angle': (
        #       'src/third_party/angle', 'HEAD')
        # then a patch to Angle project can be applied to a chromium src's
        # checkout after first updating Angle's repo to its master's HEAD.
        repo_path_map=Dict(value_type=tuple, hidden=True),

        # Check out refs/branch-heads.
        # TODO (machenbach): Only implemented for bot_update atm.
        with_branch_heads=Single(bool,
                                 empty_val=False,
                                 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)),
        BUILDSPEC_VERSION=Static(BUILDSPEC_VERSION, hidden=True),
    )
示例#26
0
def BaseConfig(CBB_CONFIG=None,
               CBB_BRANCH=None,
               CBB_BUILD_NUMBER=None,
               CBB_DEBUG=False,
               CBB_CLOBBER=False,
               CBB_BUILDBUCKET_ID=None,
               CBB_MASTER_BUILD_ID=None,
               CBB_EXTRA_ARGS=None,
               **_kwargs):
    cgrp = ConfigGroup(
        # Base mapping of repository key to repository name.
        repositories=Dict(value_type=Set(basestring)),

        # Checkout Chromite at this branch. "origin/" will be prepended.
        chromite_branch=Single(basestring, empty_val=CBB_BRANCH or 'master'),

        # Should the Chrome version be supplied to cbuildbot?
        use_chrome_version=Single(bool),

        # Should the CrOS manifest commit message be parsed and added to 'cbuildbot'
        # flags?
        read_cros_manifest=Single(bool),

        # cbuildbot tool flags.
        cbb=ConfigGroup(
            # The Chromite configuration to use.
            config=Single(basestring, empty_val=CBB_CONFIG),

            # If supplied, forward to cbuildbot as '--master-build-id'.
            build_id=Single(basestring, empty_val=CBB_MASTER_BUILD_ID),

            # If supplied, forward to cbuildbot as '--buildnumber'.
            build_number=Single(int, empty_val=CBB_BUILD_NUMBER),

            # If supplied, forward to cbuildbot as '--chrome_version'.
            chrome_version=Single(basestring),

            # If True, add cbuildbot flag: '--debug'.
            debug=Single(bool, empty_val=CBB_DEBUG),

            # If True, add cbuildbot flag: '--clobber'.
            clobber=Single(bool, empty_val=CBB_CLOBBER),

            # The (optional) configuration repository to use.
            config_repo=Single(basestring),

            # If set, supply the "--git-cache-dir" option with this value.
            git_cache_dir=Single(basestring),

            # If supplied, forward to cbuildbot as '--buildbucket-id'
            buildbucket_id=Single(basestring, empty_val=CBB_BUILDBUCKET_ID),

            # Extra arguments passed to cbuildbot.
            extra_args=List(basestring),
        ),

        # If "chromite_branch" includes a branch version, this will be set to the
        # version value. Otherwise, this will be None.
        #
        # Set in "base".
        branch_version=Single(int),
    )

    if CBB_EXTRA_ARGS:
        cgrp.cbb.extra_args = CBB_EXTRA_ARGS
    return cgrp
示例#27
0
# Copyright 2018 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.

DEPS = [ ]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
  '$recipe_engine/random': Property(
    help='Properties to control the `random` module.',
    param_name='module_properties',
    kind=ConfigGroup(
      # help='A seed to be passed to random.'
      seed=Single(int, required=False),
    ), default={},
  )
}
示例#28
0
def BaseConfig(**_kwargs):
  return ConfigGroup(
    repo_location=Single(Path)
  )
示例#29
0
# Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.

DEPS = [
    'properties',
]

from recipe_engine.recipe_api import Property
from recipe_engine.config import ConfigGroup, Single

PROPERTIES = {
    '$recipe_engine/runtime':
    Property(
        help='Properties specifically for the runtime module',
        param_name='properties',
        kind=ConfigGroup(
            # Whether build is running on LUCI stack.
            is_luci=Single(bool),
            # Whether build is running in experimental mode.
            is_experimental=Single(bool),
        ),
        default={},
    ),
}
示例#30
0
文件: config.py 项目: bopopescu/build
def BaseConfig(**_kwargs):
    return ConfigGroup(
        pool=Single(basestring),
        api_key_file_url=Single(basestring),
        api_secret_file_url=Single(basestring),
    )