Example #1
0
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(
        compile_py=ConfigGroup(compile_extra_args=List(basestring), ),
        gyp_env=ConfigGroup(
            CC=Single(basestring, required=False),
            CXX=Single(basestring, required=False),
            CXX_host=Single(basestring, required=False),
            LINK=Single(basestring, required=False),
        ),
        nacl=ConfigGroup(
            update_nacl_sdk=Single(basestring, required=False),
            NACL_SDK_ROOT=Single(basestring, 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(
            add_flaky_step=Single(bool, required=False),

            # Show test results on waterfall UI. Switch for backwards-compatibility
            # with the stand-alone test driver on older branches.
            # TODO(machenbach): Remove this switch when the feature is available on
            # all branches.
            show_test_results=Single(bool, empty_val=True, required=False),
            test_args=Set(basestring),
            SHARD_COUNT=Static(shard_count),
            SHARD_RUN=Static(shard_run),
        ),
    )
Example #2
0
def BaseConfig(BUILDER_NAME, **_kwargs):
    equal_fn = lambda tup: ('%s=%s' % tup)
    return ConfigGroup(
        BUILDER_NAME=Static(BUILDER_NAME),
        gyp_env=ConfigGroup(GYP_DEFINES=Dict(equal_fn, ' '.join,
                                             (basestring, int, Path)), ),
        flavor=Single(base_flavor.BaseFlavorUtils, repr),
    )
Example #3
0
def BaseConfig(HOST_PLATFORM, HOST_ARCH, HOST_BITS, TARGET_PLATFORM,
               TARGET_ARCH, TARGET_BITS, BUILD_CONFIG, TARGET_CROS_BOARD,
               **_kwargs):
    equal_fn = lambda tup: ('%s=%s' % (tup[0], pipes.quote(str(tup[1]))))
    return ConfigGroup(
        compile_py=ConfigGroup(
            default_targets=Set(basestring),
            build_tool=Single(basestring),
            cross_tool=Single(basestring, required=False),
            compiler=Single(basestring, required=False),
            mode=Single(basestring, required=False),
            goma_dir=Single(Path, required=False),
            clobber=Single(bool, empty_val=False, required=False,
                           hidden=False),
            pass_arch_flag=Single(bool, empty_val=False, required=False),
            xcode_sdk=Single(basestring, required=False),
            xcode_project=Single(Path, required=False),
            solution=Single(Path, required=False),
        ),
        gyp_env=ConfigGroup(
            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_MSVS_VERSION=Single(basestring, required=False),
            GYP_USE_SEPARATE_MSPDBSRV=Single(int,
                                             jsonish_fn=str,
                                             required=False),
        ),
        project_generator=ConfigGroup(
            tool=Single(basestring, empty_val='gyp'),
            args=Set(basestring),
        ),
        build_dir=Single(Path),
        cros_sdk_args=List(basestring),
        runtests=ConfigGroup(
            memory_tool=Single(basestring, required=False),
            memory_tests_runner=Single(Path),
            lsan_suppressions_file=Single(Path),
            test_args=List(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),
        gn_args=List(basestring),
    )
Example #4
0
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(
        # 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(
            add_flaky_step=Single(bool, required=False),
            test_args=Set(basestring),
            SHARD_COUNT=Static(shard_count),
            SHARD_RUN=Static(shard_run),
        ), )
Example #5
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),
        run_stack_tool_steps=Single(bool, required=False, empty_val=False),
        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')),
        gclient_custom_deps=Dict(value_type=(basestring, types.NoneType)),
        storage_bucket=Single(basestring),
        channel=Single(basestring, empty_val='chrome'),
        upload_dest_prefix=Single(basestring, empty_val=''),
        gclient_custom_vars=Dict(value_type=(basestring, types.NoneType)),
        coverage=Single(bool, required=False, empty_val=False))
Example #6
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, 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),
        abort_on_failure=Single(bool, required=False),
        allow_subannotations=Single(bool, required=False),
        always_run=Single(bool, required=False),
        can_fail_build=Single(bool, required=False),
        skip=Single(bool, required=False),
        seed_steps=List(basestring),
        followup_fn=Single(collections.Callable, required=False),
        step_test_data=Single(collections.Callable, required=False),
    )
Example #7
0
def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=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.RevisionFallbackChain),
                            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),

        # 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.RevisionFallbackChain),
                       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),
        GIT_MODE=Static(bool(GIT_MODE)),
        USE_MIRROR=Static(bool(USE_MIRROR)),
    )
Example #8
0
def BaseConfig(BUILDER_NAME, MASTER_NAME, SLAVE_NAME, **_kwargs):
  equal_fn = lambda tup: ('%s=%s' % tup)
  return ConfigGroup(
    BUILDER_NAME = Static(str(BUILDER_NAME)),
    MASTER_NAME = Static(str(MASTER_NAME)),
    SLAVE_NAME = Static(str(SLAVE_NAME)),
    build_targets = Single(list),
    builder_cfg = Single(dict),
    configuration = Single(str),
    do_test_steps = Single(bool),
    do_perf_steps = Single(bool),
    gyp_env = ConfigGroup(
      GYP_DEFINES = Dict(equal_fn, ' '.join, (basestring,int,Path)),
    ),
    is_trybot = Single(bool),
    role = Single(str),
    slave_cfg = Single(dict)
  )
Example #9
0
def BaseConfig(**_kwargs):
    return ConfigGroup(
        patch_root_dir=Single(Path,
                              required=False,
                              empty_val=Path('[CHECKOUT]')),

        # Allow manipulating patches for try jobs.
        patch_filter_script=Single(Path, required=False),
        patch_path_filter=Single(basestring, required=False),
        patch_strip_level=Single(int, required=False, empty_val=0),
    )
Example #10
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)),
    )
Example #11
0
def BaseConfig(HOST_PLATFORM, HOST_ARCH, HOST_BITS, TARGET_PLATFORM,
               TARGET_ARCH, TARGET_BITS, BUILD_CONFIG, **_kwargs):
    equal_fn = lambda tup: ('%s=%s' % (tup[0], pipes.quote(str(tup[1]))))
    return ConfigGroup(
        compile_py=ConfigGroup(
            default_targets=Set(basestring),
            build_tool=Single(basestring),
            compiler=Single(basestring, required=False),
            mode=Single(basestring, required=False),
            goma_dir=Single(Path, required=False),
            clobber=Single(bool, empty_val=False, required=False,
                           hidden=False),
            pass_arch_flag=Single(bool, empty_val=False, required=False),
        ),
        gyp_env=ConfigGroup(
            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)),
        ),
        build_dir=Single(Path),
        memory_tool=Single(basestring, required=False),
        memory_tests_runner=Single(Path),

        # 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)),
    )
Example #12
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, 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(properties=Dict(value_type=object), ), ),
        step_test_data=Single(collections.Callable, required=False),
        ok_ret=Set(int),
        infra_step=Single(bool, required=False))
Example #13
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')),
    )
Example #14
0
def BaseConfig(**_kwargs):
    return ConfigGroup(url=Single(basestring))
Example #15
0
def BaseConfig(PERF_ID=None, PERF_CONFIG=None, **_kwargs):
  return ConfigGroup(
    PERF_ID = Static(PERF_ID),
    PERF_CONFIG = Static(PERF_CONFIG),
  )
Example #16
0
def BaseConfig(**dummy_kwargs):
    return ConfigGroup(official_build=Single(bool,
                                             empty_val=False,
                                             required=False), )