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

Side by Side Diff: scripts/slave/recipe_modules/skia/default_flavor.py

Issue 1916263003: Reland "Skia: Maintain a checkout on swarming (compile) bots" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Fix expectations after roll Created 4 years, 7 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 """Default flavor utils class, used for desktop builders.""" 6 """Default flavor utils class, used for desktop builders."""
7 7
8 8
9 import json 9 import json
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 not 'TSAN' in self._skia_api.builder_name): 76 not 'TSAN' in self._skia_api.builder_name):
77 new_cmd = ['catchsegv', path_to_app] 77 new_cmd = ['catchsegv', path_to_app]
78 else: 78 else:
79 new_cmd = [path_to_app] 79 new_cmd = [path_to_app]
80 new_cmd.extend(cmd[1:]) 80 new_cmd.extend(cmd[1:])
81 return self._skia_api.run(self._skia_api.m.step, 81 return self._skia_api.run(self._skia_api.m.step,
82 name, cmd=new_cmd, **kwargs) 82 name, cmd=new_cmd, **kwargs)
83 83
84 def maybe_download_win_toolchain(self): 84 def maybe_download_win_toolchain(self):
85 """Download the Win toolchain if necessary.""" 85 """Download the Win toolchain if necessary."""
86 toolchain_hash_file = self._skia_api.skia_dir.join( 86 toolchain_hash_file = self._skia_api.infrabots_dir.join(
87 'infra', 'bots', 'win_toolchain_hash.json') 87 'win_toolchain_hash.json')
88 if (self._skia_api.m.path.exists(toolchain_hash_file) and 88 if (self._skia_api.m.path.exists(toolchain_hash_file) and
89 self._skia_api.builder_cfg.get('extra_config') == 'VS2015'): 89 self._skia_api.builder_cfg.get('extra_config') == 'VS2015'):
90 # Find the desired toolchain version. 90 # Find the desired toolchain version.
91 test_data = '''{ 91 test_data = '''{
92 "2013": "705384d88f80da637eb367e5acc6f315c0e1db2f", 92 "2013": "705384d88f80da637eb367e5acc6f315c0e1db2f",
93 "2015": "38380d77eec9164e5818ae45e2915a6f22d60e85" 93 "2015": "38380d77eec9164e5818ae45e2915a6f22d60e85"
94 }''' 94 }'''
95 j = self._skia_api._readfile(toolchain_hash_file, 95 j = self._skia_api._readfile(toolchain_hash_file,
96 name='Read win_toolchain_hash.json', 96 name='Read win_toolchain_hash.json',
97 test_data=test_data).rstrip() 97 test_data=test_data).rstrip()
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 args=['--win_toolchain_json', win_toolchain_json, 148 args=['--win_toolchain_json', win_toolchain_json,
149 '--depot_tools_parent_dir', toolchain_dir]) 149 '--depot_tools_parent_dir', toolchain_dir])
150 self._skia_api._writefile(actual_hash_file, desired_hash) 150 self._skia_api._writefile(actual_hash_file, desired_hash)
151 return toolchain_src_dir 151 return toolchain_src_dir
152 152
153 @property 153 @property
154 def chrome_path(self): 154 def chrome_path(self):
155 """Path to a checkout of Chrome on this machine.""" 155 """Path to a checkout of Chrome on this machine."""
156 if self._chrome_path is None: 156 if self._chrome_path is None:
157 if self._skia_api.running_in_swarming: 157 if self._skia_api.running_in_swarming:
158 self._chrome_path = self._skia_api.slave_dir.join('src') 158 self._chrome_path = self._skia_api.checkout_root.join('src')
159 return self._chrome_path 159 return self._chrome_path
160 160
161 if self._skia_api.m.platform.is_win: 161 if self._skia_api.m.platform.is_win:
162 chrome_path = self.maybe_download_win_toolchain() 162 chrome_path = self.maybe_download_win_toolchain()
163 if chrome_path: 163 if chrome_path:
164 self._chrome_path = chrome_path 164 self._chrome_path = chrome_path
165 return self._chrome_path 165 return self._chrome_path
166 166
167 if self._chrome_path is None: 167 if self._chrome_path is None:
168 self._chrome_path = self._skia_api.m.path.join( 168 self._chrome_path = self._skia_api.m.path.join(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return DeviceDirs( 284 return DeviceDirs(
285 dm_dir=self._skia_api.dm_dir, 285 dm_dir=self._skia_api.dm_dir,
286 perf_data_dir=self._skia_api.perf_data_dir, 286 perf_data_dir=self._skia_api.perf_data_dir,
287 resource_dir=self._skia_api.resource_dir, 287 resource_dir=self._skia_api.resource_dir,
288 images_dir=join('images'), 288 images_dir=join('images'),
289 skp_dir=self._skia_api.local_skp_dir, 289 skp_dir=self._skia_api.local_skp_dir,
290 tmp_dir=join('tmp')) 290 tmp_dir=join('tmp'))
291 291
292 def __repr__(self): 292 def __repr__(self):
293 return '<%s object>' % self.__class__.__name__ # pragma: no cover 293 return '<%s object>' % self.__class__.__name__ # pragma: no cover
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/skia/cmake_flavor.py ('k') | scripts/slave/recipe_modules/skia/xsan_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698