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

Unified Diff: tests/masters_recipes_test.py

Issue 1574433004: Allow a single trybot to mirror multiple waterfall bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@bot-config-and-test-db
Patch Set: Created 4 years, 11 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
Index: tests/masters_recipes_test.py
diff --git a/tests/masters_recipes_test.py b/tests/masters_recipes_test.py
index a1687e63d696ae9a3ee46cbf07987f3f4b086934..2793a2ac8cb5808f2f6593a9147ec70b05a4d72b 100755
--- a/tests/masters_recipes_test.py
+++ b/tests/masters_recipes_test.py
@@ -86,6 +86,20 @@ SUPPRESSIONS = {
],
}
+# TODO(kbr): remove these suppressions. They're only needed
+# temporarily during the transition of the chromium.gpu bots to the
+# Chromium recipe, in order to achieve full code coverage while the
+# bots are actually running a different recipe.
+BOGUS_BUILDER_SUPPRESSIONS = [
+ "GPU Fake Linux Builder",
+ "Fake Linux Release (NVIDIA)"
+]
+
+WRONG_RECIPE_SUPPRESSIONS = [
+ "GPU Fake Linux Builder",
+ "Fake Linux Release (NVIDIA)"
+]
+
def getBuilders(recipe_name):
"""Asks the given recipe to dump its BUILDERS dictionary.
@@ -162,7 +176,7 @@ def main(argv):
master.replace('master.', ''), {}).get('builders')
if recipe_side_builders is not None:
bogus_builders = set(recipe_side_builders.keys()).difference(
- set(builders.keys()))
+ set(builders.keys())).difference(set(BOGUS_BUILDER_SUPPRESSIONS))
if bogus_builders:
exit_code = 1
print 'The following builders from chromium recipe'
@@ -170,7 +184,8 @@ def main(argv):
print '\n'.join('\t%s' % b for b in sorted(bogus_builders))
other_recipe_builders = set(recipe_side_builders.keys()).difference(
- set(chromium_recipe_builders[master]))
+ set(chromium_recipe_builders[master])).difference(
+ set(WRONG_RECIPE_SUPPRESSIONS))
if other_recipe_builders:
exit_code = 1
print 'The following builders from chromium recipe'
@@ -199,23 +214,29 @@ def main(argv):
if recipe != 'chromium_trybot':
continue
- bot_config = recipe_side_builders.get(builder)
- if not bot_config:
+ bot_configs = recipe_side_builders.get(builder)
+ if not bot_configs:
continue
+ # Support trybots which mirror more than one waterfall bot.
+ # This is identical code to api.chromium_tests.normalize_bot_desc.
+ if not isinstance(bot_configs, (list, tuple)):
+ bot_configs = [bot_configs]
+
if args.cq_config and builder not in cq_builders.get(short_master, {}):
continue
# TODO(phajdan.jr): Make it an error if any builders referenced here
# are not using chromium recipe.
- main_waterfall_master = 'master.' + bot_config['mastername']
- bots = [bot_config['buildername']]
- if bot_config.get('tester'):
- bots.append(bot_config['tester'])
- for mw_builder in bots:
- if mw_builder in chromium_recipe_builders.get(
- main_waterfall_master, []):
- covered_builders.add((main_waterfall_master, mw_builder))
+ for bot_config in bot_configs:
+ main_waterfall_master = 'master.' + bot_config['mastername']
+ bots = [bot_config['buildername']]
+ if bot_config.get('tester'):
+ bots.append(bot_config['tester'])
+ for mw_builder in bots:
+ if mw_builder in chromium_recipe_builders.get(
+ main_waterfall_master, []):
+ covered_builders.add((main_waterfall_master, mw_builder))
# TODO(phajdan.jr): Add a way to only count trybots launched by CQ by default.
print 'Main waterfall ng-trybot coverage: %.2f' % (
« scripts/slave/recipes/chromium_trybot.py ('K') | « scripts/slave/recipes/findit/chromium/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698