Mark infra steps as infra_step in GN recipe flavors.
NOTREECHECKS=true BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2329943004 Review-Url: https://codereview.chromium.org/2329943004
This commit is contained in:
parent
f619a7af55
commit
41313595f9
@ -33,6 +33,9 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
|
||||
def _adb(self, title, *cmd, **kwargs):
|
||||
self._ever_ran_adb = True
|
||||
# The only non-infra adb call (check rc) happens to not use _adb().
|
||||
if 'infra_step' not in kwargs:
|
||||
kwargs['infra_step'] = True
|
||||
return self._run(title, 'adb', *cmd, **kwargs)
|
||||
|
||||
def compile(self, unused_target, **kwargs):
|
||||
@ -52,7 +55,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
'target_cpu': quote(target_arch),
|
||||
}.iteritems()))
|
||||
|
||||
self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'))
|
||||
self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'),
|
||||
infra_step=True)
|
||||
self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args)
|
||||
self._run('ninja', 'ninja', '-C', self.out_dir)
|
||||
|
||||
|
@ -16,11 +16,12 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
extra_config.startswith('SK')
|
||||
])
|
||||
|
||||
def _run(self, title, cmd, env=None):
|
||||
def _run(self, title, cmd, env=None, infra_step=False):
|
||||
self.m.vars.default_env = {k: v for (k,v)
|
||||
in self.m.vars.default_env.iteritems()
|
||||
if k in ['PATH']}
|
||||
self.m.run(self.m.step, title, cmd=cmd, env=env, cwd=self.m.vars.skia_dir)
|
||||
self.m.run(self.m.step, title, cmd=cmd,
|
||||
env=env, cwd=self.m.vars.skia_dir, infra_step=infra_step)
|
||||
|
||||
def compile(self, unused_target, **kwargs):
|
||||
"""Build Skia with GN."""
|
||||
@ -70,7 +71,8 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
|
||||
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems()))
|
||||
|
||||
self._run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')])
|
||||
self._run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')],
|
||||
infra_step=True)
|
||||
self._run('gn gen', ['gn', 'gen', self.out_dir, '--args=' + gn_args])
|
||||
self._run('ninja', ['ninja', '-C', self.out_dir])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user