Commit 78fd8709 authored by Kenneth Russell's avatar Kenneth Russell Committed by Commit Bot

Fix generate_buildbot_json_coveragetest.

Actually cover the code which reads luci-milo.cfg.

Bug: 843842
No-Try: True
Change-Id: Icd0fcaa2b6037c1ae3560a8ddb6e6ba777b3ac80
Tbr: thakis@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1063270
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559380}
parent 19d93b7a
...@@ -647,8 +647,8 @@ class BBJSONGenerator(object): ...@@ -647,8 +647,8 @@ class BBJSONGenerator(object):
def get_valid_bot_names(self): def get_valid_bot_names(self):
# Extract bot names from infra/config/global/luci-milo.cfg. # Extract bot names from infra/config/global/luci-milo.cfg.
bot_names = set() bot_names = set()
for l in open(os.path.join(self.this_dir, '..', '..', 'infra', 'config', for l in self.read_file(os.path.join(
'global', 'luci-milo.cfg')).readlines(): '..', '..', 'infra', 'config', 'global', 'luci-milo.cfg')).splitlines():
if (not 'name: "buildbucket/luci.chromium.' in l and if (not 'name: "buildbucket/luci.chromium.' in l and
not 'name: "buildbot/chromium.' in l): not 'name: "buildbot/chromium.' in l):
continue continue
...@@ -669,11 +669,11 @@ class BBJSONGenerator(object): ...@@ -669,11 +669,11 @@ class BBJSONGenerator(object):
if waterfall['name'] in ['chromium.android.fyi', 'chromium.fyi', if waterfall['name'] in ['chromium.android.fyi', 'chromium.fyi',
'chromium.lkgr', 'client.v8.chromium']: 'chromium.lkgr', 'client.v8.chromium']:
# TODO(thakis): Remove this once these bots move to luci. # TODO(thakis): Remove this once these bots move to luci.
continue continue # pragma: no cover
if waterfall['name'] in ['tryserver.webrtc']: if waterfall['name'] in ['tryserver.webrtc']:
# These waterfalls have their bot configs in a different repo. # These waterfalls have their bot configs in a different repo.
# so we don't know about their bot names. # so we don't know about their bot names.
continue continue # pragma: no cover
raise self.unknown_bot(bot_name, waterfall['name']) raise self.unknown_bot(bot_name, waterfall['name'])
# All test suites must be referenced. # All test suites must be referenced.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment