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, |