| OLD | NEW |
| (Empty) | |
| 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import collections |
| 6 import logging |
| 7 import sys |
| 8 |
| 9 from common.slave_alloc import SlaveAllocator |
| 10 from common.cros_chromite import Get, ChromiteTarget |
| 11 from master.cros import builder_config |
| 12 |
| 13 |
| 14 # Declare a slave allocator. We do this here so we can access the slaves |
| 15 # configured by 'slaves.cfg' in 'master.cfg'. |
| 16 slave_allocator = SlaveAllocator() |
| 17 |
| 18 |
| 19 # Get the pinned Chromite configuration. |
| 20 cbb_config = Get(allow_fetch=True) |
| 21 |
| 22 |
| 23 # Select any board that is configured to build on this waterfall. |
| 24 def _GetWaterfallTargets(): |
| 25 result = collections.OrderedDict() |
| 26 for config in cbb_config.itervalues(): |
| 27 if config.get('active_waterfall') != 'chromiumos': |
| 28 continue |
| 29 result[config.name] = config |
| 30 return result |
| 31 waterfall_targets = _GetWaterfallTargets() |
| 32 |
| 33 |
| 34 # Load the builder configs. |
| 35 builder_configs = builder_config.GetBuilderConfigs(waterfall_targets) |
| 36 builder_name_map = dict((c.builder_name, c) |
| 37 for c in builder_configs.itervalues()) |
| OLD | NEW |