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

Unified Diff: scripts/slave/recipe_modules/skia/api.py

Issue 2162563002: [Skia] Convert Sk Images to a CIPD package (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Fix whitespace Created 4 years, 5 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 | « no previous file | scripts/slave/recipe_modules/skia/default_flavor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/skia/api.py
diff --git a/scripts/slave/recipe_modules/skia/api.py b/scripts/slave/recipe_modules/skia/api.py
index cf12bafe543d5d92820f4be790b4ebb269278d95..ac7aeae0bf1a973148d33f1b48c322b63d587d3e 100644
--- a/scripts/slave/recipe_modules/skia/api.py
+++ b/scripts/slave/recipe_modules/skia/api.py
@@ -205,7 +205,11 @@ class SkiaApi(recipe_api.RecipeApi):
# Set some important variables.
self.resource_dir = self.skia_dir.join('resources')
- self.images_dir = self.slave_dir.join('images')
+ self.images_dir = self.slave_dir.join('skimage')
+ if not self.m.path.exists(self.infrabots_dir.join(
+ 'assets', 'skimage', 'VERSION')):
+ # TODO(borenet): Remove this once enough time has passed.
+ self.images_dir = self.slave_dir.join('images')
self.skia_out = self.skia_dir.join('out', self.builder_name)
self.swarming_out_dir = self.make_path(self.m.properties['swarm_out_dir'])
self.local_skp_dir = self.slave_dir.join('skps')
@@ -525,13 +529,25 @@ for p in psutil.process_iter():
def _copy_images(self):
"""Download and copy test images if needed."""
- version = self.check_actual_version(
- VERSION_FILE_SK_IMAGE,
- self.tmp_dir,
- test_actual_version=self.m.properties.get(
- 'test_downloaded_sk_image_version',
- TEST_EXPECTED_SK_IMAGE_VERSION),
- )
+ version_file = self.infrabots_dir.join('assets', 'skimage', 'VERSION')
+ if self.m.path.exists(version_file):
+ version_file = self.infrabots_dir.join('assets', 'skimage', 'VERSION')
+ test_data = self.m.properties.get(
+ 'test_actual_skp_version', TEST_EXPECTED_SKP_VERSION)
+ version = self._readfile(version_file,
+ name='Get downloaded skimage VERSION',
+ test_data=test_data).rstrip()
+ self._writefile(self.m.path.join(self.tmp_dir, VERSION_FILE_SK_IMAGE),
+ version)
+ else:
+ # TODO(borenet): Remove this once enough time has passed.
+ version = self.check_actual_version(
+ VERSION_FILE_SK_IMAGE,
+ self.tmp_dir,
+ test_actual_version=self.m.properties.get(
+ 'test_downloaded_sk_image_version',
+ TEST_EXPECTED_SK_IMAGE_VERSION),
+ )
self.copy_dir(
version,
VERSION_FILE_SK_IMAGE,
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/skia/default_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698