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

Unified Diff: tools/mb/mb_unittest.py

Issue 1880903002: Switch MB to write the GN args to args.gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_mb_goma
Patch Set: fix unicode handling in gn_helpers 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.py ('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 1a600d8d3c6242c8efff1a3246fb1a43c16d6913..6d54bf721e46ee00dd7d1ab8044282d09f61362c 100755
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -299,18 +299,25 @@ class UnitTest(unittest.TestCase):
})
def test_gn_gen(self):
+ mbw = self.fake_mbw()
self.check(['gen', '-c', 'gn_debug_goma', '//out/Default', '-g', '/goma'],
- ret=0,
+ mbw=mbw, ret=0,
out=('/fake_src/buildtools/linux64/gn gen //out/Default '
- '\'--args=is_debug=true use_goma=true goma_dir="/goma"\' '
'--check\n'))
+ self.assertMultiLineEqual(mbw.files['/fake_src/out/Default/args.gn'],
+ ('goma_dir = "/goma"\n'
+ 'is_debug = true\n'
+ 'use_goma = true\n'))
mbw = self.fake_mbw(win32=True)
self.check(['gen', '-c', 'gn_debug_goma', '-g', 'c:\\goma', '//out/Debug'],
mbw=mbw, ret=0,
out=('c:\\fake_src\\buildtools\\win\\gn.exe gen //out/Debug '
- '"--args=is_debug=true use_goma=true goma_dir=\\"'
- 'c:\\goma\\"" --check\n'))
+ '--check\n'))
+ self.assertMultiLineEqual(mbw.files['c:\\fake_src\\out\\Debug\\args.gn'],
+ ('goma_dir = "c:\\\\goma"\n'
+ 'is_debug = true\n'
+ 'use_goma = true\n'))
def test_gn_gen_fails(self):
@@ -388,9 +395,13 @@ class UnitTest(unittest.TestCase):
def test_gn_lookup_goma_dir_expansion(self):
self.check(['lookup', '-c', 'gn_rel_bot', '-g', '/foo'], ret=0,
- out=("/fake_src/buildtools/linux64/gn gen _path_ "
- "'--args=is_debug=false use_goma=true "
- "goma_dir=\"/foo\"'\n" ))
+ out=('\n'
+ 'Writing """\\\n'
+ 'goma_dir = "/foo"\n'
+ 'is_debug = false\n'
+ 'use_goma = true\n'
+ '""" to _path_/args.gn.\n\n'
+ '/fake_src/buildtools/linux64/gn gen _path_\n'))
def test_gyp_analyze(self):
mbw = self.check(['analyze', '-c', 'gyp_rel_bot', '//out/Release',
« no previous file with comments | « tools/mb/mb.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698