| Index: masters/master.chromiumos/slaves.cfg
|
| diff --git a/masters/master.chromiumos/slaves.cfg b/masters/master.chromiumos/slaves.cfg
|
| index 4127945a15209b097e8670c7a83ecbbf28fdf1df..227e0afb0b6b402f246dcb9011bbb24dd181bc51 100644
|
| --- a/masters/master.chromiumos/slaves.cfg
|
| +++ b/masters/master.chromiumos/slaves.cfg
|
| @@ -1,41 +1,42 @@
|
| -# -*- python -*-
|
| -# ex: set syntax=python:
|
| -
|
| -# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +# Copyright (c) 2015 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.
|
|
|
| -builder_hostname_map = {
|
| - 'amd64-generic ASAN': ['build84-m2'],
|
| - 'amd64-generic paladin': ['build141-m2'],
|
| - 'amd64-generic_freon paladin': ['build182-m2'],
|
| - 'amd64-generic full': ['build90-m2'],
|
| - 'amd64-generic incremental': ['build86-m2'],
|
| - 'arm-generic paladin': ['build263-m2'],
|
| - 'arm-generic full': ['build92-m2'],
|
| - 'daisy incremental': ['build87-m2'],
|
| - 'daisy full': ['build91-m2'],
|
| - 'gizmo paladin': ['build118-m2'],
|
| - 'mipsel-o32-generic paladin': ['build112-m2'],
|
| - 'mipsel-o32-generic full': ['build93-m2'],
|
| - 'panther_embedded-minimal paladin': ['build203-m2'],
|
| - 'x86-generic ASAN': ['build94-m2'],
|
| - 'x86-generic paladin': ['build174-m2'],
|
| - 'x86-generic incremental': ['build85-m2'],
|
| - 'x86-generic full': ['build89-m2'],
|
| - 'chromiumos sdk': ['build162-m2'], # Should stay on a faster machine
|
| - 'refresh packages (chromium:412795)': ['build94-m2'],
|
| -}
|
| +import chromiumos_board_config
|
| +
|
| +from common.cros_chromite import SlaveType
|
| +
|
| +# Use the SlaveAlloctor declared in 'board_config'.
|
| +sa = chromiumos_board_config.slave_allocator
|
| +sa.LoadState(enforce=False)
|
| +
|
| +# Baremetal slaves (e.g., build123-m2)
|
| +sa.AddPool(SlaveType.BAREMETAL, *('build%s-m2' % (number,) for number in (
|
| + 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 94, 112, 118, 141, 162, 174, 182,
|
| + 203, 263,
|
| +)))
|
| +
|
| +for board_config in chromiumos_board_config.builder_configs.itervalues():
|
| + name = board_config.config.name
|
| + sa.Join(
|
| + name,
|
| + sa.Alloc(
|
| + 'builder',
|
| + pools=[SlaveType.BAREMETAL],
|
| + exclusive=False,
|
| + subtype=name))
|
|
|
| -hostname_builder_map = {}
|
| -for builder, hostnames in builder_hostname_map.iteritems():
|
| - for hostname in hostnames:
|
| - hostname_builder_map.setdefault(hostname, []).append(builder)
|
| +def GenSlave(hostname, config_names):
|
| + return {
|
| + 'master': 'ChromiumOS',
|
| + 'builder': [chromiumos_board_config.builder_configs[c].builder_name
|
| + for c in config_names],
|
| + 'hostname': str(hostname),
|
| + 'os': 'linux',
|
| + 'version': 'precise',
|
| + }
|
|
|
| slaves = []
|
| -for hostname, builders in hostname_builder_map.iteritems():
|
| - slaves.append({'master': 'ChromiumOS',
|
| - 'builder': builders,
|
| - 'hostname': hostname,
|
| - 'os': 'linux',
|
| - 'version': 'precise'})
|
| +slave_map = sa.GetSlaveMap()
|
| +for hostname, entry in slave_map.entries.iteritems():
|
| + slaves.append(GenSlave(hostname, entry.keys))
|
|
|