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

Unified Diff: tools/mb/mb_unittest.py

Issue 1109453002: Re-roll GN to 326666 and fix GN-related bugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete stray blank line Created 5 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 9551377626439f1545beee7581b0388ddd7b2aad..efb453c26845840c09989f5ce3153b0e223676be 100644
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -153,6 +153,24 @@ class UnitTest(unittest.TestCase):
'status': 'Found dependency (all)',
})
+ def test_gn_analyze_missing_file(self):
+ files = {'/tmp/in.json': """{\
+ "files": ["foo/foo_unittest.cc"],
+ "targets": ["bar_unittests"]
+ }"""}
+ mbw = self.fake_mbw(files)
+ mbw.Call = lambda cmd: (
+ 1, 'The input matches no targets, configs, or files\n', '')
+
+ self.check(['analyze', '-c', 'gn_debug', '//out/Default',
+ '/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
+ out = json.loads(mbw.files['/tmp/out.json'])
+ self.assertEqual(out, {
+ 'build_targets': [],
+ 'targets': [],
+ 'status': 'No dependency',
+ })
+
def test_gyp_analyze(self):
self.check(['analyze', '-c', 'gyp_rel_bot', '//out/Release',
'/tmp/in.json', '/tmp/out.json'],
« 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