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

Unified Diff: tools/mb/mb_unittest.py

Issue 1881823002: Support references to args files in MB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mb_write_args_file
Patch Set: fix indent Created 4 years, 8 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 6d54bf721e46ee00dd7d1ab8044282d09f61362c..63b81d5379408f35951b72d5be3f032cf8a99f53 100755
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -118,6 +118,7 @@ TEST_CONFIG = """\
'fake_gyp_crosscompile_builder': 'gyp_crosscompile',
'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',
},
},
'mixins': {
@@ -176,6 +177,9 @@ class UnitTest(unittest.TestCase):
def fake_mbw(self, files=None, win32=False):
mbw = FakeMBW(win32=win32)
mbw.files.setdefault(mbw.default_config, TEST_CONFIG)
+ mbw.files.setdefault(
+ mbw.ToAbsPath('//build/args/bots/fake_master/fake_gn_args_bot.gn'),
+ 'is_debug = false\n')
if files:
for path, contents in files.items():
mbw.files[path] = contents
@@ -319,6 +323,14 @@ class UnitTest(unittest.TestCase):
'is_debug = true\n'
'use_goma = true\n'))
+ mbw = self.fake_mbw()
+ self.check(['gen', '-m', 'fake_master', '-b', 'fake_gn_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_gn_args_bot.gn")\n')
+
def test_gn_gen_fails(self):
mbw = self.fake_mbw()
@@ -448,7 +460,6 @@ class UnitTest(unittest.TestCase):
def test_validate(self):
mbw = self.fake_mbw()
- mbw.files[mbw.default_config] = TEST_CONFIG
self.check(['validate'], mbw=mbw, ret=0)
def test_bad_validate(self):
« 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