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

Unified Diff: infra/bots/recipe_modules/flavor/gn_flavor.py

Issue 2300173002: GN: expunge all environment variables that have no effect on GN (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: infra/bots/recipe_modules/flavor/gn_flavor.py
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index 66497b5d584e6c3973761d6b5aa38d9d1dbcad33..f759d4bcc4edbabb7e6d52aed6c2ad701f0bfdb6 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -15,6 +15,11 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
extra_config.startswith('SK')
])
+ 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)
+
def compile(self, unused_target, **kwargs):
"""Build Skia with GN."""
compiler = self.m.vars.builder_cfg.get('compiler', '')
@@ -55,9 +60,6 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
'is_debug': 'true' if configuration == 'Debug' else 'false',
}.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])

Powered by Google App Engine
This is Rietveld 408576698