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

Unified Diff: tools/mb/mb_unittest.py

Issue 2031233002: Rework how MB and GN handle concurrent links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move concurrent_links into a dedicated .gni Created 4 years, 6 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
« build/toolchain/win/BUILD.gn ('K') | « 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 9181b77b85c72fa4619da52c0f80cc3f8a0b6c02..8747ac4e59c7e9a881b8b3254d4c832a588a17b2 100755
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -175,6 +175,31 @@ TEST_BAD_CONFIG = """\
}
"""
+
+GYP_HACKS_CONFIG = """\
+{
+ 'masters': {
+ 'chromium': {},
+ 'fake_master': {
+ 'fake_builder': 'fake_config',
+ },
+ },
+ 'configs': {
+ 'fake_config': ['fake_mixin'],
+ },
+ 'mixins': {
+ 'fake_mixin': {
+ 'type': 'gyp',
+ 'gn_args': '',
+ 'gyp_defines':
+ ('foo=bar llvm_force_head_revision=1 '
+ 'gyp_link_concurrency=1 baz=1'),
+ },
+ },
+}
+"""
+
+
class UnitTest(unittest.TestCase):
def fake_mbw(self, files=None, win32=False):
mbw = FakeMBW(win32=win32)
@@ -473,6 +498,16 @@ class UnitTest(unittest.TestCase):
mbw.files[mbw.default_config] = TEST_BAD_CONFIG
self.check(['validate'], mbw=mbw, ret=1)
+ def test_gyp_env_hacks(self):
+ mbw = self.fake_mbw()
+ mbw.files[mbw.default_config] = GYP_HACKS_CONFIG
+ self.check(['lookup', '-c', 'fake_config'], mbw=mbw,
+ ret=0,
+ out=("GYP_DEFINES='foo=bar baz=1'\n"
+ "GYP_LINK_CONCURRENCY=1\n"
+ "LLVM_FORCE_HEAD_REVISION=1\n"
+ "python build/gyp_chromium -G output_dir=_path_\n"))
+
if __name__ == '__main__':
unittest.main()
« build/toolchain/win/BUILD.gn ('K') | « tools/mb/mb_config.pyl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698