Index: infra/bots/recipe_modules/flavor/gn_android_flavor.py |
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
index 9f3480a1a7f593012211aa128a835a1d4dad8526..12832ecc83ad88380d43dcabf034e5aedd4f2446 100644 |
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
@@ -9,6 +9,11 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): |
def supported(self): |
return 'GN_Android' == self.m.vars.builder_cfg.get('extra_config', '') |
+ def _run(self, title, cmd): |
+ path = self.m.vars.default_env['PATH'] |
+ self.m.vars.default_env = {'PATH': path} |
+ self.m.run(self.m.step, title, cmd=cmd, cwd=self.m.vars.skia_dir, env={}) |
+ |
def compile(self, unused_target, **kwargs): |
compiler = self.m.vars.builder_cfg.get('compiler') |
configuration = self.m.vars.builder_cfg.get('configuration') |
@@ -35,9 +40,6 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): |
'target_cpu': quote(target_arch), |
}.iteritems())) |
- run = lambda title, cmd: self.m.run(self.m.step, title, cmd=cmd, |
- cwd=self.m.vars.skia_dir, **kwargs) |
- |
- run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')]) |
- run('gn gen', ['gn', 'gen', self.out_dir, '--args=' + gn_args]) |
- run('ninja', ['ninja', '-C', self.out_dir]) |
+ self._run('fetch-gn', [self.m.vars.skia_dir.join('bin', 'fetch-gn')]) |
+ self._run('gn gen', ['gn', 'gen', self.out_dir, '--args=' + gn_args]) |
+ self._run('ninja', ['ninja', '-C', self.out_dir]) |