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

Unified Diff: tools/mb/mb_unittest.py

Issue 2391343002: Add 2 config names for builder 'Blimp Android Tester' (Closed)
Patch Set: Dirk comments. Created 4 years, 2 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
« no previous file with comments | « tools/mb/mb_config.pyl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/mb/mb_unittest.py
diff --git a/tools/mb/mb_unittest.py b/tools/mb/mb_unittest.py
index 6870b24f862b5f9ad47d60b76a40486252f38da8..b0957008817b4f1ceb08f0532d9c726633fcdb5a 100755
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -114,7 +114,7 @@ TEST_CONFIG = """\
'fake_gn_debug_builder': 'gn_debug_goma',
'fake_gyp_builder': 'gyp_debug',
'fake_gn_args_bot': '//build/args/bots/fake_master/fake_gn_args_bot.gn',
- 'fake_multi_phase': ['gn_phase_1', 'gn_phase_2'],
+ 'fake_multi_phase': { 'phase_1': 'gn_phase_1', 'phase_2': 'gn_phase_2'},
},
},
'configs': {
@@ -468,27 +468,23 @@ class UnitTest(unittest.TestCase):
# Check that passing a --phase to a single-phase builder fails.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_gn_builder',
- '--phase', '1'],
- ret=1)
+ '--phase', 'phase_1'], ret=1)
self.assertIn('Must not specify a build --phase', mbw.out)
- # Check different ranges; 0 and 3 are out of bounds, 1 and 2 should work.
+ # Check that passing a wrong phase key to a multi-phase builder fails.
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
- '--phase', '0'], ret=1)
- self.assertIn('Phase 0 out of bounds', mbw.out)
+ '--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',
- '--phase', '1'], ret=0)
+ '--phase', 'phase_1'], ret=0)
self.assertIn('phase = 1', mbw.out)
mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
- '--phase', '2'], ret=0)
+ '--phase', 'phase_2'], ret=0)
self.assertIn('phase = 2', mbw.out)
- mbw = self.check(['lookup', '-m', 'fake_master', '-b', 'fake_multi_phase',
- '--phase', '3'], ret=1)
- self.assertIn('Phase 3 out of bounds', mbw.out)
-
def test_validate(self):
mbw = self.fake_mbw()
self.check(['validate'], mbw=mbw, ret=0)
« no previous file with comments | « tools/mb/mb_config.pyl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698