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

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

Issue 1791513002: Fix compile on Windows swarming bot (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Handle AccessDenied Created 4 years, 9 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
« no previous file with comments | « infra/bots/common.py ('k') | infra/bots/skia_repo.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/flavor/default_flavor.py
diff --git a/infra/bots/flavor/default_flavor.py b/infra/bots/flavor/default_flavor.py
index 3603f043aab6cfd8d30e3c45696632881101d092..5933b6c3cf409139695036e707fc791bc1b6eb3b 100644
--- a/infra/bots/flavor/default_flavor.py
+++ b/infra/bots/flavor/default_flavor.py
@@ -69,7 +69,7 @@ class DefaultFlavorUtils(object):
"""
def __init__(self, bot_info, *args, **kwargs):
self._bot_info = bot_info
- self.chrome_path = os.path.join(os.path.expanduser('~'), 'src')
+ self.chrome_path = os.path.join(self._bot_info.build_dir, 'src')
def run(self, cmd, **kwargs):
"""Runs a step as appropriate for this flavor."""
@@ -84,14 +84,26 @@ class DefaultFlavorUtils(object):
new_cmd.extend(cmd[1:])
return self._bot_info.run(new_cmd, **kwargs)
+ def bootstrap_win_toolchain(self):
+ """Run bootstrapping script for the Windows toolchain."""
+ bootstrap_script = os.path.join(self._bot_info.infrabots_dir,
+ 'bootstrap_win_toolchain_json.py')
+ win_toolchain_json = os.path.join(
+ self._bot_info.build_dir, 'src', 'build', 'win_toolchain.json')
+ self._bot_info.run([
+ 'python', bootstrap_script,
+ '--win_toolchain_json', win_toolchain_json,
+ '--depot_tools_parent_dir', self._bot_info.build_dir])
def compile(self, target):
"""Build the given target."""
# The CHROME_PATH environment variable is needed for bots that use
# toolchains downloaded by Chrome.
- env = {'CHROME_PATH': self.chrome_path}
+ env = {}
if sys.platform == 'win32':
make_cmd = ['python', 'make.py']
+ env['CHROME_PATH'] = self.chrome_path
+ self._bot_info._run_once(self.bootstrap_win_toolchain)
else:
make_cmd = ['make']
cmd = make_cmd + [target]
« no previous file with comments | « infra/bots/common.py ('k') | infra/bots/skia_repo.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698