cbuildbot_config: add buildbot_waterfall_name field
This field will hint to buildbot what builder name to use on the
waterfall.
BUG=chromium:456200
TEST=New unit test
Change-Id: I4b978edec42eef24c63a244bddd8f1a99ef14f3e
Reviewed-on: https://chromium-review.googlesource.com/247380
Trybot-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/cbuildbot/cbuildbot_config.py b/cbuildbot/cbuildbot_config.py
index e7dd543..4b3437a 100755
--- a/cbuildbot/cbuildbot_config.py
+++ b/cbuildbot/cbuildbot_config.py
@@ -653,6 +653,13 @@
# =============================================================================
# The documentation associated with the config.
doc=None,
+
+# =============================================================================
+# Hints to Buildbot master UI
+
+# buildbot_waterfall_name -- If set, tells buildbot what name to give to the
+# corresponding builder on its waterfall.
+ buildbot_waterfall_name=None,
)
diff --git a/cbuildbot/cbuildbot_config_unittest.py b/cbuildbot/cbuildbot_config_unittest.py
index fe898b6..a47ed0c 100644
--- a/cbuildbot/cbuildbot_config_unittest.py
+++ b/cbuildbot/cbuildbot_config_unittest.py
@@ -499,6 +499,16 @@
board))
prebuilt_slave_boards[board] = slave['name']
+ def testNoDuplicateWaterfallNames(self):
+ """Tests that no two configs specify same waterfall name."""
+ waterfall_names = set()
+ for config in cbuildbot_config.config.values():
+ wn = config['buildbot_waterfall_name']
+ if wn is not None:
+ self.assertNotIn(wn, waterfall_names,
+ 'Duplicate waterfall name %s.' % wn)
+ waterfall_names.add(wn)
+
def testCantBeBothTypesOfAFDO(self):
"""Using afdo_generate and afdo_use together doesn't work."""
for config in cbuildbot_config.config.values():
diff --git a/cbuildbot/config_dump.json b/cbuildbot/config_dump.json
index 686ad59..577b6d4 100644
--- a/cbuildbot/config_dump.json
+++ b/cbuildbot/config_dump.json
@@ -16,6 +16,7 @@
"build_packages_in_background": false,
"build_tests": true,
"build_type": "pfq",
+ "buildbot_waterfall_name": null,
"child_configs": [],
"chrome_binhost_only": false,
"chrome_rev": null,