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

Side by Side Diff: infra/bots/flavor/default_flavor.py

Issue 1823653002: Swarming: Ensure depot_tools is in PATH when compiling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """Default flavor utils class, used for desktop bots.""" 9 """Default flavor utils class, used for desktop bots."""
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 def compile(self, target): 100 def compile(self, target):
101 """Build the given target.""" 101 """Build the given target."""
102 # The CHROME_PATH environment variable is needed for bots that use 102 # The CHROME_PATH environment variable is needed for bots that use
103 # toolchains downloaded by Chrome. 103 # toolchains downloaded by Chrome.
104 env = {} 104 env = {}
105 if sys.platform == 'win32': 105 if sys.platform == 'win32':
106 make_cmd = ['python', 'make.py'] 106 make_cmd = ['python', 'make.py']
107 env['CHROME_PATH'] = self.chrome_path 107 env['CHROME_PATH'] = self.chrome_path
108 self._bot_info._run_once(self.bootstrap_win_toolchain) 108 self._bot_info._run_once(self.bootstrap_win_toolchain)
109 else: 109 else:
110 # Ensure depot_tools is in PATH.
111 depot_tools = os.path.join('/b', 'depot_tools')
112 env['PATH'] = os.pathsep.join([depot_tools, os.environ['PATH']])
110 make_cmd = ['make'] 113 make_cmd = ['make']
111 cmd = make_cmd + [target] 114 cmd = make_cmd + [target]
112 self._bot_info.run(cmd, env=env) 115 self._bot_info.run(cmd, env=env)
113 116
114 def device_path_join(self, *args): 117 def device_path_join(self, *args):
115 """Like os.path.join(), but for paths on a connected device.""" 118 """Like os.path.join(), but for paths on a connected device."""
116 return os.path.join(*args) 119 return os.path.join(*args)
117 120
118 def device_path_exists(self, path): 121 def device_path_exists(self, path):
119 """Like os.path.exists(), but for paths on a connected device.""" 122 """Like os.path.exists(), but for paths on a connected device."""
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return DeviceDirs( 181 return DeviceDirs(
179 dm_dir=os.path.join(self._bot_info.swarm_out_dir, 'dm'), 182 dm_dir=os.path.join(self._bot_info.swarm_out_dir, 'dm'),
180 perf_data_dir=self._bot_info.perf_data_dir, 183 perf_data_dir=self._bot_info.perf_data_dir,
181 resource_dir=self._bot_info.resource_dir, 184 resource_dir=self._bot_info.resource_dir,
182 images_dir=join('images'), 185 images_dir=join('images'),
183 skp_dir=self._bot_info.local_skp_dir, 186 skp_dir=self._bot_info.local_skp_dir,
184 tmp_dir=join('tmp')) 187 tmp_dir=join('tmp'))
185 188
186 def __repr__(self): 189 def __repr__(self):
187 return '<%s object>' % self.__class__.__name__ # pragma: no cover 190 return '<%s object>' % self.__class__.__name__ # pragma: no cover
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698