summaryrefslogtreecommitdiff
path: root/cbuildbot/generate_chromeos_config.py
diff options
context:
space:
mode:
authorDon Garrett <dgarrett@google.com>2015-05-21 19:24:28 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-28 00:51:51 +0000
commitf2904ae8cee464b319fe32d1504634a60ac95392 (patch)
tree91f4b8e58527fa76c425f05ba910ab18c78163fa /cbuildbot/generate_chromeos_config.py
parentf5909602f1602aad1a3683681e4e9b48f068dc52 (diff)
downloadchromite-f2904ae8cee464b319fe32d1504634a60ac95392.tar.gz
config_lib: Move GetSlavesForMaster.
Move this function from generate_chromeos_config to config_lib.Config, and update all call sites. The unittests related to this method seem to really be testing the configuration information, not the method itself, so they remain in generate_chromeos_config_unittest. BUG=chromium:483566 TEST=cros lint + run_tests Change-Id: Ia9b38b4c868c6800df77c819dcb7ba63448f7893 Reviewed-on: https://chromium-review.googlesource.com/272831 Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Queue: Don Garrett <dgarrett@chromium.org> Tested-by: Don Garrett <dgarrett@chromium.org>
Diffstat (limited to 'cbuildbot/generate_chromeos_config.py')
-rw-r--r--cbuildbot/generate_chromeos_config.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/cbuildbot/generate_chromeos_config.py b/cbuildbot/generate_chromeos_config.py
index ccf11f22b..9dd02d4af 100644
--- a/cbuildbot/generate_chromeos_config.py
+++ b/cbuildbot/generate_chromeos_config.py
@@ -534,52 +534,6 @@ def GetDefaultWaterfall(build_config):
return None
-def GetSlavesForMaster(master_config, options=None):
- """Gets the important slave builds corresponding to this master.
-
- A slave config is one that matches the master config in build_type,
- chrome_rev, and branch. It also must be marked important. For the
- full requirements see the logic in code below.
-
- The master itself is eligible to be a slave (of itself) if it has boards.
-
- Args:
- master_config: A build config for a master builder.
- options: The options passed on the commandline. This argument is optional,
- and only makes sense when called from cbuildbot.
-
- Returns:
- A list of build configs corresponding to the slaves for the master
- represented by master_config.
-
- Raises:
- AssertionError if the given config is not a master config or it does
- not have a manifest_version.
- """
- # This is confusing. "config" really should be capitalized in this file.
- all_configs = GetConfig()
-
- assert master_config['manifest_version']
- assert master_config['master']
-
- slave_configs = []
- if options is not None and options.remote_trybot:
- return slave_configs
-
- # TODO(davidjames): In CIDB the master isn't considered a slave of itself, so
- # we probably shouldn't consider it a slave here either.
- for build_config in all_configs.itervalues():
- if (build_config['important'] and
- build_config['manifest_version'] and
- (not build_config['master'] or build_config['boards']) and
- build_config['build_type'] == master_config['build_type'] and
- build_config['chrome_rev'] == master_config['chrome_rev'] and
- build_config['branch'] == master_config['branch']):
- slave_configs.append(build_config)
-
- return slave_configs
-
-
class HWTestList(object):
"""Container for methods to generate HWTest lists."""