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

Side by Side Diff: tools-webrtc/mb/mb_unittest.py

Issue 2697133002: Reland of iOS: Use JSON for GN configuration instead of MB + remove symbols (Closed)
Patch Set: Fix iOS reading in MB Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools-webrtc/mb/mb_config.pyl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Tests for mb.py.""" 10 """Tests for mb.py."""
11 11
12 import ast 12 import ast
13 import json 13 import json
14 import StringIO 14 import StringIO
15 import os 15 import os
16 import sys 16 import sys
17 import unittest 17 import unittest
18 18
19 import mb 19 import mb
20 20
21 21
22 class FakeMBW(mb.MetaBuildWrapper): 22 class FakeMBW(mb.MetaBuildWrapper):
23 def __init__(self, win32=False): 23 def __init__(self, win32=False):
24 super(FakeMBW, self).__init__() 24 super(FakeMBW, self).__init__()
25 25
26 # Override vars for test portability. 26 # Override vars for test portability.
27 if win32: 27 if win32:
28 self.chromium_src_dir = 'c:\\fake_src' 28 self.src_dir = 'c:\\fake_src'
29 self.default_config = 'c:\\fake_src\\tools-webrtc\\mb\\mb_config.pyl' 29 self.default_config = 'c:\\fake_src\\tools-webrtc\\mb\\mb_config.pyl'
30 self.default_isolate_map = ('c:\\fake_src\\testing\\buildbot\\' 30 self.default_isolate_map = ('c:\\fake_src\\testing\\buildbot\\'
31 'gn_isolate_map.pyl') 31 'gn_isolate_map.pyl')
32 self.platform = 'win32' 32 self.platform = 'win32'
33 self.executable = 'c:\\python\\python.exe' 33 self.executable = 'c:\\python\\python.exe'
34 self.sep = '\\' 34 self.sep = '\\'
35 else: 35 else:
36 self.chromium_src_dir = '/fake_src' 36 self.src_dir = '/fake_src'
37 self.default_config = '/fake_src/tools-webrtc/mb/mb_config.pyl' 37 self.default_config = '/fake_src/tools-webrtc/mb/mb_config.pyl'
38 self.default_isolate_map = '/fake_src/testing/buildbot/gn_isolate_map.pyl' 38 self.default_isolate_map = '/fake_src/testing/buildbot/gn_isolate_map.pyl'
39 self.executable = '/usr/bin/python' 39 self.executable = '/usr/bin/python'
40 self.platform = 'linux2' 40 self.platform = 'linux2'
41 self.sep = '/' 41 self.sep = '/'
42 42
43 self.files = {} 43 self.files = {}
44 self.calls = [] 44 self.calls = []
45 self.cmds = [] 45 self.cmds = []
46 self.cross_compile = None 46 self.cross_compile = None
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 self.check(['lookup', '-c', 'fake_config'], mbw=mbw, 778 self.check(['lookup', '-c', 'fake_config'], mbw=mbw,
779 ret=0, 779 ret=0,
780 out=("GYP_DEFINES='foo=bar baz=1'\n" 780 out=("GYP_DEFINES='foo=bar baz=1'\n"
781 "GYP_LINK_CONCURRENCY=1\n" 781 "GYP_LINK_CONCURRENCY=1\n"
782 "LLVM_FORCE_HEAD_REVISION=1\n" 782 "LLVM_FORCE_HEAD_REVISION=1\n"
783 "python build/gyp_chromium -G output_dir=_path_\n")) 783 "python build/gyp_chromium -G output_dir=_path_\n"))
784 784
785 785
786 if __name__ == '__main__': 786 if __name__ == '__main__':
787 unittest.main() 787 unittest.main()
OLDNEW
« no previous file with comments | « tools-webrtc/mb/mb_config.pyl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698