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

Unified Diff: tools/mb/mb_unittest.py

Issue 1453423002: Remove code for old style of 'analyze' in MB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 1a0f901f901a72c396a1a849d434eca6e92eb50b..68c557584d0153a56483cb77f651fdd4a64a56cf 100755
--- a/tools/mb/mb_unittest.py
+++ b/tools/mb/mb_unittest.py
@@ -204,25 +204,6 @@ class UnitTest(unittest.TestCase):
def test_gn_analyze(self):
files = {'/tmp/in.json': """{\
"files": ["foo/foo_unittest.cc"],
- "targets": ["foo_unittests", "bar_unittests"]
- }"""}
-
- mbw = self.fake_mbw(files)
- mbw.Call = lambda cmd, env=None, buffer_output=True: (
- 0, 'out/Default/foo_unittests\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, {
- 'status': 'Found dependency',
- 'targets': ['foo_unittests'],
- 'build_targets': ['foo_unittests']
- })
-
- def test_gn_analyze_new_logic(self):
- files = {'/tmp/in.json': """{\
- "files": ["foo/foo_unittest.cc"],
"test_targets": ["foo_unittests", "bar_unittests"],
"additional_compile_targets": []
}"""}
@@ -243,21 +224,6 @@ class UnitTest(unittest.TestCase):
def test_gn_analyze_all(self):
files = {'/tmp/in.json': """{\
"files": ["foo/foo_unittest.cc"],
- "targets": ["all", "bar_unittests"]
- }"""}
- mbw = self.fake_mbw(files)
- mbw.Call = lambda cmd, env=None, buffer_output=True: (
- 0, 'out/Default/foo_unittests\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, {
- 'status': 'Found dependency (all)',
- })
-
- def test_gn_analyze_all_new_logic(self):
- files = {'/tmp/in.json': """{\
- "files": ["foo/foo_unittest.cc"],
"test_targets": ["bar_unittests"],
"additional_compile_targets": ["all"]
}"""}
@@ -276,27 +242,6 @@ class UnitTest(unittest.TestCase):
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.cmds = [
- (0, '', ''),
- (1, 'The input matches no targets, configs, or files\n', ''),
- (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_gn_analyze_missing_file_new_logic(self):
- files = {'/tmp/in.json': """{\
- "files": ["foo/foo_unittest.cc"],
"test_targets": ["bar_unittests"],
"additional_compile_targets": []
}"""}
« 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