Replace all uses of the word 'master' with 'builder_group' in //tools/mb

This removes every reference but the "--master/-m" cmd-line arg and the
"masters" mb_config.pyl key, which will be removed in a follow-up once
all users of mb.py (ie: recipes) have switched over.

"builder_group" is also the term we're using when replacing "master" in
recipe code: crbug.com/1109276. So we should conform on using that term
going forward.

Bug: chromium:1117773
Change-Id: I1de1b8e68bcf2c9d68b00a05f0f5761cf8b4ef9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201382
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#32964}
This commit is contained in:
Mirko Bonadei
2021-01-12 14:29:40 +01:00
committed by Commit Bot
parent 6e509f9167
commit 8606b9c218
5 changed files with 58 additions and 54 deletions

View File

@ -111,12 +111,12 @@ class FakeFile(object):
TEST_CONFIG = """\
{
'masters': {
'builder_groups': {
'chromium': {},
'fake_master': {
'fake_group': {
'fake_builder': 'rel_bot',
'fake_debug_builder': 'debug_goma',
'fake_args_bot': '//build/args/bots/fake_master/fake_args_bot.gn',
'fake_args_bot': '//build/args/bots/fake_group/fake_args_bot.gn',
'fake_multi_phase': { 'phase_1': 'phase_1', 'phase_2': 'phase_2'},
'fake_android_bot': 'android_bot',
},
@ -169,7 +169,7 @@ class UnitTest(unittest.TestCase):
},
}''')
mbw.files.setdefault(
mbw.ToAbsPath('//build/args/bots/fake_master/fake_args_bot.gn'),
mbw.ToAbsPath('//build/args/bots/fake_group/fake_args_bot.gn'),
'is_debug = false\n')
if files:
for path, contents in files.items():
@ -238,12 +238,12 @@ class UnitTest(unittest.TestCase):
'--check\n', mbw.out)
mbw = self.fake_mbw()
self.check(['gen', '-m', 'fake_master', '-b', 'fake_args_bot',
self.check(['gen', '-m', 'fake_group', '-b', 'fake_args_bot',
'//out/Debug'],
mbw=mbw, ret=0)
self.assertEqual(
mbw.files['/fake_src/out/Debug/args.gn'],
'import("//build/args/bots/fake_master/fake_args_bot.gn")\n\n')
'import("//build/args/bots/fake_group/fake_args_bot.gn")\n\n')
def test_gen_fails(self):
@ -801,26 +801,26 @@ class UnitTest(unittest.TestCase):
def test_multiple_phases(self):
# Check that not passing a --phase to a multi-phase builder fails.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase'],
mbw = self.check(['lookup', '-m', 'fake_group', '-b', 'fake_multi_phase'],
ret=1)
self.assertIn('Must specify a build --phase', mbw.out)
# Check that passing a --phase to a single-phase builder fails.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_builder',
mbw = self.check(['lookup', '-m', 'fake_group', '-b', 'fake_builder',
'--phase', 'phase_1'], ret=1)
self.assertIn('Must not specify a build --phase', mbw.out)
# Check that passing a wrong phase key to a multi-phase builder fails.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
mbw = self.check(['lookup', '-m', 'fake_group', '-b', 'fake_multi_phase',
'--phase', 'wrong_phase'], ret=1)
self.assertIn('Phase wrong_phase doesn\'t exist', mbw.out)
# Check that passing a correct phase key to a multi-phase builder passes.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
mbw = self.check(['lookup', '-m', 'fake_group', '-b', 'fake_multi_phase',
'--phase', 'phase_1'], ret=0)
self.assertIn('phase = 1', mbw.out)
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
mbw = self.check(['lookup', '-m', 'fake_group', '-b', 'fake_multi_phase',
'--phase', 'phase_2'], ret=0)
self.assertIn('phase = 2', mbw.out)