Example #1
0
def get_builder_spec(builder_name):
    builder_dict = builder_name_schema.DictForBuilderName(builder_name)
    env = get_extra_env_vars(builder_dict)
    gyp_defs = gyp_defines(builder_dict)
    gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()]
    gyp_defs_list.sort()
    env['GYP_DEFINES'] = ' '.join(gyp_defs_list)
    rv = {
        'builder_cfg': builder_dict,
        'dm_flags': dm_flags.get_args(builder_name),
        'env': env,
        'nanobench_flags': nanobench_flags.get_args(builder_name),
    }
    device = device_cfg(builder_dict)
    if device:
        rv['device_cfg'] = device

    role = builder_dict['role']
    if role == builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
        configuration = CONFIG_RELEASE
    else:
        configuration = builder_dict.get('configuration', CONFIG_DEBUG)
    arch = (builder_dict.get('arch') or builder_dict.get('target_arch'))
    if ('Win' in builder_dict.get('os', '') and arch == 'x86_64'):
        configuration += '_x64'
    rv['configuration'] = configuration
    rv['do_test_steps'] = role == builder_name_schema.BUILDER_ROLE_TEST
    rv['do_perf_steps'] = (role == builder_name_schema.BUILDER_ROLE_PERF
                           or (role == builder_name_schema.BUILDER_ROLE_TEST
                               and configuration == CONFIG_DEBUG))
    if 'Valgrind' in builder_name:
        rv['do_perf_steps'] = True
    if 'GalaxyS4' in builder_name:
        rv['do_perf_steps'] = False

    rv['build_targets'] = build_targets_from_builder_dict(
        builder_dict, rv['do_test_steps'], rv['do_perf_steps'])

    # Do we upload perf results?
    upload_perf_results = False
    if role == builder_name_schema.BUILDER_ROLE_PERF:
        upload_perf_results = True
    rv['upload_perf_results'] = upload_perf_results

    # Do we upload correctness results?
    skip_upload_bots = [
        'ASAN',
        'Coverage',
        'TSAN',
        'UBSAN',
        'Valgrind',
    ]
    upload_dm_results = True
    for s in skip_upload_bots:
        if s in builder_name:
            upload_dm_results = False
            break
    rv['upload_dm_results'] = upload_dm_results

    return rv
Example #2
0
    def _KeyParams(self):
        """Build a unique key from the builder name (as a list).

    E.g.  arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
    """
        # Don't bother to include role, which is always Test.
        # TryBots are uploaded elsewhere so they can use the same key.
        blacklist = ['role', 'is_trybot']

        params = builder_name_schema.DictForBuilderName(self._builder_name)
        flat = []
        for k in sorted(params.keys()):
            if k not in blacklist:
                flat.append(k)
                flat.append(params[k])
        return flat
Example #3
0
    def _KeyParams(self):
        """Build a unique key from the builder name (as a list).

    E.g.:  os Mac10.6 model MacMini4.1 gpu GeForce320M arch x86

    This info is used by nanobench in its JSON output.
    """
        params = builder_name_schema.DictForBuilderName(self._builder_name)
        blacklist = ['configuration', 'role', 'is_trybot']
        # Don't include role (always Perf) or configuration (always Release).
        # TryBots can use the same exact key as they are uploaded to a different
        # location.
        #
        # It would be great to simplify this even further, but right now we have
        # two models for the same GPU (eg. GalaxyNexus/NexusS for SGX540) and two
        # gpus for the same model (ShuttleA for GTX660/HD7770).
        for name in blacklist:
            if name in params:
                del params[name]
        flat = []
        for k in sorted(params.keys()):
            flat.append(k)
            flat.append(params[k])
        return flat