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

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

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 import base_flavor 6 import base_flavor
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 'from host to device is undefined and only allowed if ' 211 'from host to device is undefined and only allowed if '
212 'host_path and device_path are the same (%s vs %s).' % ( 212 'host_path and device_path are the same (%s vs %s).' % (
213 str(host_path), str(device_path))) 213 str(host_path), str(device_path)))
214 214
215 def create_clean_device_dir(self, path): 215 def create_clean_device_dir(self, path):
216 """Like shutil.rmtree() + os.makedirs(), but on a connected device.""" 216 """Like shutil.rmtree() + os.makedirs(), but on a connected device."""
217 self.create_clean_host_dir(path) 217 self.create_clean_host_dir(path)
218 218
219 def create_clean_host_dir(self, path): 219 def create_clean_host_dir(self, path):
220 """Convenience function for creating a clean directory.""" 220 """Convenience function for creating a clean directory."""
221 self._skia_api.m.path.rmtree( 221 self._skia_api.m.file.rmtree(
222 self._skia_api.m.path.basename(path), path) 222 self._skia_api.m.path.basename(path), path)
223 self._skia_api.m.path.makedirs( 223 self._skia_api.m.file.makedirs(
224 self._skia_api.m.path.basename(path), path) 224 self._skia_api.m.path.basename(path), path)
225 225
226 def install(self): 226 def install(self):
227 """Run device-specific installation steps.""" 227 """Run device-specific installation steps."""
228 pass 228 pass
229 229
230 def cleanup_steps(self): 230 def cleanup_steps(self):
231 """Run any device-specific cleanup steps.""" 231 """Run any device-specific cleanup steps."""
232 pass 232 pass
233 233
234 def get_device_dirs(self): 234 def get_device_dirs(self):
235 """ Set the directories which will be used by the build steps. 235 """ Set the directories which will be used by the build steps.
236 236
237 These refer to paths on the same device where the test executables will 237 These refer to paths on the same device where the test executables will
238 run, for example, for Android bots these are paths on the Android device 238 run, for example, for Android bots these are paths on the Android device
239 itself. For desktop bots, these are just local paths. 239 itself. For desktop bots, these are just local paths.
240 """ 240 """
241 pardir = self._skia_api.m.path.pardir 241 pardir = self._skia_api.m.path.pardir
242 join = self._skia_api.m.path['slave_build'].join 242 join = self._skia_api.m.path['slave_build'].join
243 return DeviceDirs( 243 return DeviceDirs(
244 dm_dir=join('dm'), 244 dm_dir=join('dm'),
245 perf_data_dir=self._skia_api.perf_data_dir, 245 perf_data_dir=self._skia_api.perf_data_dir,
246 resource_dir=self._skia_api.resource_dir, 246 resource_dir=self._skia_api.resource_dir,
247 images_dir=join('images'), 247 images_dir=join('images'),
248 skp_dirs=self._skia_api.local_skp_dirs, 248 skp_dirs=self._skia_api.local_skp_dirs,
249 skp_perf_dir=self._skia_api.perf_data_dir, 249 skp_perf_dir=self._skia_api.perf_data_dir,
250 tmp_dir=join('tmp')) 250 tmp_dir=join('tmp'))
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/skia/api.py ('k') | scripts/slave/recipe_modules/swarming/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698