예제 #1
0
      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),
    ),
  )


config_ctx = config_item_context(BaseConfig, {}, 'v8')


@config_ctx()
def v8(c):
  pass


@config_ctx()
def android_arm(c):
  # Make is executed in the out dir. Android points to the toplevel Makefile in
  # the v8 dir.
  c.compile_py.compile_extra_args.extend(['-C', '..' , 'android_arm.release'])


@config_ctx()
예제 #2
0
# Copyright 2014 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.

import types

from slave.recipe_config import config_item_context, ConfigGroup
from slave.recipe_config import Single

def BaseConfig(**_kwargs):
  return ConfigGroup(
    url = Single(basestring)
  )

config_ctx = config_item_context(BaseConfig, {}, 'basic')

@config_ctx()
def production(c):
  c.url = "https://chromeperf.appspot.com"
  
@config_ctx()
def testing(c):
  c.url = "https://chrome-perf.googleplex.com"
예제 #3
0
        GIT_MODE=Static(bool(GIT_MODE)),
        USE_MIRROR=Static(bool(USE_MIRROR)),
    )


VAR_TEST_MAP = {
    'USE_MIRROR': (True, False),
    'GIT_MODE': (True, False),
    'CACHE_DIR': (None, 'CACHE_DIR'),
}

TEST_NAME_FORMAT = lambda kwargs: (
    'using_mirror-%(USE_MIRROR)s-git_mode-%(GIT_MODE)s-cache_dir-%(using)s' %
    dict(using=bool(kwargs['CACHE_DIR']), **kwargs))

config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, TEST_NAME_FORMAT)


def ChromiumSvnSubURL(c, *pieces):
    BASES = ('https://src.chromium.org', 'svn://svn-mirror.golo.chromium.org')
    return '/'.join((BASES[c.USE_MIRROR], ) + pieces)


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


def ChromiumSrcURL(c):
    if c.GIT_MODE:
        return ChromiumGitURL(c, 'chromium', 'src.git')
    else:
예제 #4
0
        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),
        ),
    )


config_ctx = config_item_context(BaseConfig, {}, 'v8')


@config_ctx()
def v8(c):
    pass


@config_ctx()
def android_arm(c):
    # Make is executed in the out dir. Android points to the toplevel Makefile in
    # the v8 dir.
    c.compile_py.compile_extra_args.extend(['-C', '..', 'android_arm.release'])


@config_ctx()
예제 #5
0
        'flavor': default_flavor.DefaultFlavorUtils,
    },
}


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),
    )


VAR_TEST_MAP = {
    'BUILDER_NAME': ('Test-Ubuntu12-ShuttleA-NoGPU-x86_64-Debug', ),
}

config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, '%(BUILDER_NAME)s')


@config_ctx(is_root=True)
def skia(c):
    """Base config for Skia."""
    c.gyp_env.GYP_DEFINES.update(
        CONFIG_MAP.get(c.BUILDER_NAME, {}).get('gyp_defines', {}))
    c.flavor = CONFIG_MAP.get(c.BUILDER_NAME,
                              {}).get('flavor',
                                      default_flavor.DefaultFlavorUtils)()
예제 #6
0
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import types

from slave.recipe_config import config_item_context, ConfigGroup, Single
from RECIPE_MODULES.syzygy import api as syzygy_api


def BaseConfig(**dummy_kwargs):
    return ConfigGroup(official_build=Single(bool,
                                             empty_val=False,
                                             required=False), )


config_ctx = config_item_context(BaseConfig, {}, 'syzygy')


@config_ctx(is_root=True)
def BASE(c):
    pass


@config_ctx()
def syzygy(c):
    c.official_build = False


@config_ctx()
def syzygy_official(c):
    c.official_build = True
예제 #7
0
    ),
    'TEMP_DIR': (
        ['/', 'fake_tmp'],
        ['C:\\', 'fake_temp'],
    ),
}


def test_name(args):
    if args['CURRENT_WORKING_DIR'][0] == '/':
        return 'posix'
    else:
        return 'windows'


config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, test_name)


@config_ctx(is_root=True)
def BASE(c):
    c.base_paths['cwd'] = c.CURRENT_WORKING_DIR
    c.base_paths['tmp_base'] = c.TEMP_DIR


@config_ctx()
def buildbot(c):
    c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
    c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
    for token in ('build_internal', 'build', 'depot_tools'):
        c.base_paths[token] = c.base_paths['root'] + (token, )
    c.dynamic_paths['checkout'] = None
예제 #8
0
    # 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)
  )


config_ctx = config_item_context(BaseConfig, {'_DUMMY': ['val']}, 'example')

@config_ctx()
def test(c):
  c.name = 'test'
  c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')]
예제 #9
0
파일: config.py 프로젝트: zanxi/bitpop
    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),
    )


config_ctx = config_item_context(BaseConfig, {"_DUMMY": ["val"]}, "example")


@config_ctx()
def test(c):
    c.name = "test"
    c.cmd = [Path("[CHECKOUT]", "build", "tools", "cool_script.py")]
예제 #10
0
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import types

from slave.recipe_config import config_item_context, ConfigGroup, Single
from RECIPE_MODULES.syzygy import api as syzygy_api


def BaseConfig(**dummy_kwargs):
  return ConfigGroup(
    official_build = Single(bool, empty_val=False, required=False),
  )


config_ctx = config_item_context(BaseConfig, {}, 'syzygy')


@config_ctx(is_root=True)
def BASE(c):
  pass


@config_ctx()
def syzygy(c):
  c.official_build = False


@config_ctx()
def syzygy_official(c):
  c.official_build = True
예제 #11
0
    ),
    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')),
  )

config_ctx = config_item_context(
  BaseConfig,
  {'USE_MIRROR': (False,)},
  'android')

@config_ctx()
def AOSP(c):
  c.lunch_flavor = 'full-eng'
  c.repo.url = 'https://android.googlesource.com/platform/manifest'
  c.repo.branch = 'android-4.4_r1'
  c.repo.sync_flags = ['-j6', '-d', '-f']

@config_ctx(includes=['AOSP'])
def AOSP_webview(c):
  c.sync_manifest_override = Path('[CHECKOUT]', 'android_webview', 'buildbot',
                                  'aosp_manifest.xml')
예제 #12
0
        # 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),
    )


config_ctx = config_item_context(BaseConfig, {'_DUMMY': ['val']}, 'example')


@config_ctx()
def test(c):
    c.name = 'test'
    c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')]
예제 #13
0
    ['/', 'b', 'build', 'slave', 'fake_slave', 'build'],
    ['E:\\', 'build', 'slave', 'fake_slave', 'build'],
  ),
  'TEMP_DIR': (
    ['/', 'fake_tmp'],
    ['C:\\', 'fake_temp'],
  ),
}

def test_name(args):
  if args['CURRENT_WORKING_DIR'][0] == '/':
    return 'posix'
  else:
    return 'windows'

config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, test_name)

@config_ctx(is_root=True)
def BASE(c):
  c.base_paths['cwd'] = c.CURRENT_WORKING_DIR
  c.base_paths['tmp_base'] = c.TEMP_DIR

@config_ctx()
def buildbot(c):
  c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
  c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
  for token in ('build_internal', 'build', 'depot_tools'):
    c.base_paths[token] = c.base_paths['root'] + (token,)
  c.dynamic_paths['checkout'] = None

예제 #14
0
# Copyright 2014 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.

import types

from slave.recipe_config import config_item_context, ConfigGroup
from slave.recipe_config import Single


def BaseConfig(**_kwargs):
    return ConfigGroup(url=Single(basestring))


config_ctx = config_item_context(BaseConfig, {}, 'basic')


@config_ctx()
def production(c):
    c.url = "https://chromeperf.appspot.com/add_point"


@config_ctx()
def testing(c):
    c.url = "https://chrome-perf.googleplex.com/add_point"
예제 #15
0
def build_targets_from_builder_dict(builder_dict):
  """Return a list of targets to build, depending on the builder type."""
  if builder_dict.get('target_arch') == 'NaCl':
    return ['skia_lib', 'debugger']
  elif builder_dict.get('extra_config') == 'ZeroGPUCache':
    return ['gm']
  elif (builder_dict['role'] == builder_name_schema.BUILDER_ROLE_TEST and
        builder_dict.get('extra_config') == 'TSAN'):
    return ['dm']
  elif builder_dict['role'] == builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
    return ['tools', 'gm', 'dm']
  else:
    return ['most']


config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, '%(BUILDER_NAME)s')


@config_ctx(is_root=True)
def skia(c):
  """Base config for Skia."""
  c.builder_cfg = builder_name_schema.DictForBuilderName(c.BUILDER_NAME)
  c.build_targets = build_targets_from_builder_dict(c.builder_cfg)
  c.configuration = c.builder_cfg.get('configuration', CONFIG_DEBUG)
  c.role = c.builder_cfg['role']
  c.do_test_steps = c.role == builder_name_schema.BUILDER_ROLE_TEST
  c.do_perf_steps = (c.role == builder_name_schema.BUILDER_ROLE_PERF or
                     (c.role == builder_name_schema.BUILDER_ROLE_TEST and
                      c.configuration == CONFIG_DEBUG) or
                     'Valgrind' in c.BUILDER_NAME)
  c.gyp_env.GYP_DEFINES.update(gyp_defs_from_builder_dict(c.builder_cfg))
예제 #16
0
파일: config.py 프로젝트: zanxi/bitpop
    "INTERNAL": [True, False],
    "REPO_NAME": ["src/clank"],
    "REPO_URL": ["<hidden>"],  # supplied in build properties
    "BUILD_CONFIG": ["Debug", "Release"],
}


def TEST_NAME_FORMAT(kwargs):
    name = "repo-%(REPO_NAME)s-from-url-%(REPO_URL)s" % kwargs
    if kwargs["INTERNAL"]:
        return name + "-internal"
    else:
        return name


config_ctx = config_item_context(BaseConfig, VAR_TEST_MAP, TEST_NAME_FORMAT)


@config_ctx(is_root=True)
def base_config(c):
    c.internal_dir_name = "clank"


@config_ctx()
def main_builder(c):
    pass


@config_ctx()
def clang_builder(c):
    pass
예제 #17
0
        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')),
    )


config_ctx = config_item_context(BaseConfig, {'USE_MIRROR': (False, )},
                                 'android')


@config_ctx()
def AOSP(c):
    c.lunch_flavor = 'full-eng'
    c.repo.url = 'https://android.googlesource.com/platform/manifest'
    c.repo.branch = 'android-4.4_r1'
    c.repo.sync_flags = ['-j6', '-d', '-f']


@config_ctx(includes=['AOSP'])
def AOSP_webview(c):
    c.sync_manifest_override = Path('[CHECKOUT]', 'android_webview',
                                    'buildbot', 'aosp_manifest.xml')