Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: scripts/master/cros_builders_pools.py

Issue 8305010: Add ChromiumOS Trybot support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/master/cros_builder_mapping.py ('k') | scripts/master/cros_try_job_git.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/cros_builders_pools.py
===================================================================
--- scripts/master/cros_builders_pools.py (revision 0)
+++ scripts/master/cros_builders_pools.py (revision 0)
@@ -0,0 +1,32 @@
+# Copyright (c) 2011 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.
+
+"""Implement builder selection for CrOS."""
+
+from master.builders_pools import BuildersPools
+
+class CrOSBuildersPools(BuildersPools):
+ """Adds support for builder config->name mappings."""
+
+ def __init__(self, default_pool_name, builder_mapping, parent=None):
+ BuildersPools.__init__(self, default_pool_name, parent)
+ self._builder_mapping = builder_mapping
+
+ def Select(self, builder_names=None, pool_name=None):
+ """Returns list of selected builder names.
+
+ Args:
+ builder_names: A list of CrOS build configurations (i.e.,
+ x86-generic-pre-flight-queue) to select.
+ pool_name: The builder pool to look in.
+
+ Returns:
+ A list of buildbot builder names.
+ """
+ # If the user has requested specific build configurations, return the
+ # corresponding builder names.
+ if builder_names:
+ return [self._builder_mapping.get(name) for name in builder_names]
+ else:
+ return BuildersPools.Select(self, None, pool_name)
Property changes on: scripts/master/cros_builders_pools.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « scripts/master/cros_builder_mapping.py ('k') | scripts/master/cros_try_job_git.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698