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

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

Issue 2215443003: [recipes] Increase test coverage (Closed) Base URL: https://skia.googlesource.com/skia.git@merge_buildbot_spec
Patch Set: 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 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 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 """Default flavor utils class, used for desktop builders.""" 9 """Default flavor utils class, used for desktop builders."""
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 @property 166 @property
167 def out_dir(self): 167 def out_dir(self):
168 """Flavor-specific out directory.""" 168 """Flavor-specific out directory."""
169 return self.m.vars.skia_out.join(self.m.vars.configuration) 169 return self.m.vars.skia_out.join(self.m.vars.configuration)
170 170
171 def device_path_join(self, *args): 171 def device_path_join(self, *args):
172 """Like os.path.join(), but for paths on a connected device.""" 172 """Like os.path.join(), but for paths on a connected device."""
173 return self.m.path.join(*args) 173 return self.m.path.join(*args)
174 174
175 def device_path_exists(self, path): # pragma: no cover
176 """Like os.path.exists(), but for paths on a connected device."""
177 return self.m.path.exists(path, infra_step=True)
178
179 def copy_directory_contents_to_device(self, host_dir, device_dir): 175 def copy_directory_contents_to_device(self, host_dir, device_dir):
180 """Like shutil.copytree(), but for copying to a connected device.""" 176 """Like shutil.copytree(), but for copying to a connected device."""
181 # For "normal" builders who don't have an attached device, we expect 177 # For "normal" builders who don't have an attached device, we expect
182 # host_dir and device_dir to be the same. 178 # host_dir and device_dir to be the same.
183 if str(host_dir) != str(device_dir): 179 if str(host_dir) != str(device_dir):
184 raise ValueError('For builders who do not have attached devices, copying ' 180 raise ValueError('For builders who do not have attached devices, copying '
185 'from host to device is undefined and only allowed if ' 181 'from host to device is undefined and only allowed if '
186 'host_path and device_path are the same (%s vs %s).' % ( 182 'host_path and device_path are the same (%s vs %s).' % (
187 str(host_dir), str(device_dir))) # pragma: no cover 183 str(host_dir), str(device_dir))) # pragma: no cover
188 184
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 dm_dir=self.m.vars.dm_dir, 218 dm_dir=self.m.vars.dm_dir,
223 perf_data_dir=self.m.vars.perf_data_dir, 219 perf_data_dir=self.m.vars.perf_data_dir,
224 resource_dir=self.m.vars.resource_dir, 220 resource_dir=self.m.vars.resource_dir,
225 images_dir=self.m.vars.images_dir, 221 images_dir=self.m.vars.images_dir,
226 skp_dir=self.m.vars.local_skp_dir, 222 skp_dir=self.m.vars.local_skp_dir,
227 tmp_dir=self.m.vars.tmp_dir) 223 tmp_dir=self.m.vars.tmp_dir)
228 224
229 def cleanup_steps(self): 225 def cleanup_steps(self):
230 """Run any device-specific cleanup steps.""" 226 """Run any device-specific cleanup steps."""
231 pass 227 pass
232
233 def __repr__(self):
234 return '<%s object>' % self.__class__.__name__ # pragma: no cover
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698