Reland of iOS: Use JSON for GN configuration instead of MB + remove symbols
Reason for revert:
MB is now updated to handle spaces in the buildername properly, something that
only affected our commit bots (not trybots).
Original issue's description:
> Revert of iOS: Use JSON for GN configuration instead of MB + remove symbols (patchset #4 id:80001 of https://codereview.webrtc.org/2688103002/ )
>
> Reason for revert:
> Something is different from trybots vs the commit bots, causing it to fail when running GN:
> https://build.chromium.org/p/client.webrtc/builders/iOS32%20Release/builds/10151
>
> Original issue's description:
> > iOS: Use JSON for GN configuration instead of MB + remove symbols.
> >
> > This aligns with how the ios recipe module is used in Chromium.
> > It should prevent breakages like one we had recently.
> >
> > It also means we're no longer setting symbol_level=1 explicitly.
> > The default is 0 (no symbols), which is now what's being used.
> >
> > Also move all the directories containing JSON files into
> > tools-webrtc/ios/bots to make it clearer (and more similar to
> > Chromium).
> >
> > BUG=webrtc:7140, webrtc:7161
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2688103002
> > Cr-Commit-Position: refs/heads/master@{#16633}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/73f01de4edda30c419bf6daf8b91d2a0d28c06a9
>
> TBR=ehmaldonado@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7140, webrtc:7161
>
> Review-Url: https://codereview.webrtc.org/2694423002
> Cr-Commit-Position: refs/heads/master@{#16634}
> Committed: https://chromium.googlesource.com/external/webrtc/+/68ab366547b7494b69e28047b17ad2ebd64e9edd
TBR=ehmaldonado@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7140, webrtc:7161
Review-Url: https://codereview.webrtc.org/2697133002
Cr-Commit-Position: refs/heads/master@{#16636}
diff --git a/tools-webrtc/mb/mb.py b/tools-webrtc/mb/mb.py
index 49f681f..1801a13 100755
--- a/tools-webrtc/mb/mb.py
+++ b/tools-webrtc/mb/mb.py
@@ -33,8 +33,8 @@
from collections import OrderedDict
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
-CHROMIUM_SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
-sys.path = [os.path.join(CHROMIUM_SRC_DIR, 'build')] + sys.path
+SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
+sys.path = [os.path.join(SRC_DIR, 'build')] + sys.path
import gn_helpers
@@ -46,7 +46,7 @@
class MetaBuildWrapper(object):
def __init__(self):
- self.chromium_src_dir = CHROMIUM_SRC_DIR
+ self.src_dir = SRC_DIR
self.default_config = os.path.join(SCRIPT_DIR, 'mb_config.pyl')
self.default_isolate_map = os.path.join(SCRIPT_DIR, 'gn_isolate_map.pyl')
self.executable = sys.executable
@@ -619,8 +619,9 @@
def ReadIOSBotConfig(self):
if not self.args.master or not self.args.builder:
return {}
- path = self.PathJoin(self.chromium_src_dir, 'ios', 'build', 'bots',
- self.args.master, self.args.builder + '.json')
+ path = self.PathJoin(self.src_dir, 'tools-webrtc', 'ios',
+ self.args.master,
+ self.args.builder.replace(' ', '_') + '.json')
if not self.Exists(path):
return {}
@@ -921,7 +922,7 @@
'--isolate',
self.ToSrcRelPath('%s/%s.isolate' % (build_dir, target)),
],
- 'dir': self.chromium_src_dir,
+ 'dir': self.src_dir,
'version': 1,
},
isolate_path + 'd.gen.json',
@@ -966,7 +967,7 @@
else:
subdir, exe = 'win', 'gn.exe'
- gn_path = self.PathJoin(self.chromium_src_dir, 'buildtools', subdir, exe)
+ gn_path = self.PathJoin(self.src_dir, 'buildtools', subdir, exe)
return [gn_path, subcommand, path] + list(args)
@@ -1137,7 +1138,7 @@
return cmdline, extra_files
def ToAbsPath(self, build_path, *comps):
- return self.PathJoin(self.chromium_src_dir,
+ return self.PathJoin(self.src_dir,
self.ToSrcRelPath(build_path),
*comps)
@@ -1145,7 +1146,7 @@
"""Returns a relative path from the top of the repo."""
if path.startswith('//'):
return path[2:].replace('/', self.sep)
- return self.RelPath(path, self.chromium_src_dir)
+ return self.RelPath(path, self.src_dir)
def ParseGYPConfigPath(self, path):
rpath = self.ToSrcRelPath(path)
@@ -1433,12 +1434,12 @@
def Call(self, cmd, env=None, buffer_output=True):
if buffer_output:
- p = subprocess.Popen(cmd, shell=False, cwd=self.chromium_src_dir,
+ p = subprocess.Popen(cmd, shell=False, cwd=self.src_dir,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env=env)
out, err = p.communicate()
else:
- p = subprocess.Popen(cmd, shell=False, cwd=self.chromium_src_dir,
+ p = subprocess.Popen(cmd, shell=False, cwd=self.src_dir,
env=env)
p.wait()
out = err = ''