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

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

Issue 2209423002: [recipes] Remove build environment vars from default_env (Closed) Base URL: https://skia.googlesource.com/skia.git@merge_buildbot_spec_fix_coverage
Patch Set: [recipes] Remove build environment vars from default_env Created 4 years, 4 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/default_flavor.py
diff --git a/infra/bots/recipe_modules/flavor/default_flavor.py b/infra/bots/recipe_modules/flavor/default_flavor.py
index 4cdbaaa671fd00db8689b4432fb0d74b6150bf80..f1837c2fba969b7b6d9a8f9b8662bbecef034354 100644
--- a/infra/bots/recipe_modules/flavor/default_flavor.py
+++ b/infra/bots/recipe_modules/flavor/default_flavor.py
@@ -111,7 +111,7 @@ class DefaultFlavorUtils(object):
'--depot_tools_parent_dir',
self._win_toolchain_dir])
- def build_command_buffer(self):
+ def build_command_buffer(self, **kwargs):
"""Build command_buffer."""
script = self.m.vars.skia_dir.join('tools', 'build_command_buffer.py')
self.m.run(
@@ -120,13 +120,15 @@ class DefaultFlavorUtils(object):
args=['--chrome-dir', self.m.vars.checkout_root,
'--output-dir', self.out_dir,
'--chrome-build-type', self.m.vars.configuration,
- '--no-sync'])
+ '--no-sync'],
+ **kwargs)
- def compile(self, target):
+ def compile(self, target, **kwargs):
"""Build the given target."""
+ env = kwargs.pop('env', {})
# The CHROME_PATH environment variable is needed for builders that use
# toolchains downloaded by Chrome.
- env = {'CHROME_PATH': self.chrome_path}
+ env['CHROME_PATH'] = self.chrome_path
if self.m.platform.is_win:
make_cmd = ['python', 'make.py']
self.m.run.run_once(self.bootstrap_win_toolchain)
@@ -137,16 +139,16 @@ class DefaultFlavorUtils(object):
cmd = make_cmd + [target]
try:
self.m.run(self.m.step, 'build %s' % target, cmd=cmd,
- env=env, cwd=self.m.path['checkout'])
+ env=env, cwd=self.m.path['checkout'], **kwargs)
except self.m.step.StepFailure:
if self.m.platform.is_win:
# The linker occasionally crashes on Windows. Try again.
self.m.run(self.m.step, 'build %s' % target, cmd=cmd,
- env=env, cwd=self.m.path['checkout'])
+ env=env, cwd=self.m.path['checkout'], **kwargs)
else:
raise
if 'CommandBuffer' in self.m.vars.builder_name:
- self.m.run.run_once(self.build_command_buffer)
+ self.m.run.run_once(self.build_command_buffer, env=env)
def copy_extra_build_products(self, swarming_out_dir):
"""Copy extra build products to specified directory.

Powered by Google App Engine
This is Rietveld 408576698