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

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

Issue 1441173003: CT Skia recipe to run DM on the top 10k SKPs using swarming (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@ct-swarming-perf
Patch Set: Fix Created 5 years, 1 month 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
Index: scripts/slave/recipe_modules/ct_swarming/api.py
diff --git a/scripts/slave/recipe_modules/ct_swarming/api.py b/scripts/slave/recipe_modules/ct_swarming/api.py
index 918a56009bb9c8df59ef6f3c545c5d9ff2073297..a2e06a3be5ac30036109b3bbb25c09791d117451 100644
--- a/scripts/slave/recipe_modules/ct_swarming/api.py
+++ b/scripts/slave/recipe_modules/ct_swarming/api.py
@@ -84,6 +84,24 @@ os.chmod('%s', os.stat('%s').st_mode | stat.S_IEXEC)
slave_num),
dest=wpr_dir)
+ def download_skps(self, page_type, slave_num, skps_chromium_build):
+ """Downloads SKPs corresponding to the specified page type, slave and build.
+
+ The SKPs are downloaded into subdirectories in the downloads_dir.
+
+ Args:
+ page_type: str. The CT page type. Eg: 1k, 10k.
+ slave_num: int. The number of the slave used to determine which GS
+ directory to download from. Eg: for the top 1k, slave1 will
+ contain SKPs from webpages 1-10, slave2 will contain 11-20.
+ skps_chromium_build: str. The build the SKPs were captured from.
+ """
+ skps_dir = self.downloads_dir.join('slave%s' % slave_num, 'skps')
+ self.m.file.makedirs('Create SKPs dir', skps_dir)
borenet 2015/11/24 19:34:28 Should you delete the directory before creating it
rmistry 2015/11/24 19:58:41 Sure. Done.
+ full_source = 'gs://%s/skps/%s/%s/slave%s/*' % (
+ CT_GS_BUCKET, page_type, skps_chromium_build, slave_num)
+ self.m.gsutil(['-m', 'cp', full_source, skps_dir])
+
def create_isolated_gen_json(self, isolate_path, base_dir, os_type,
slave_num, extra_variables):
"""Creates an isolated.gen.json file.

Powered by Google App Engine
This is Rietveld 408576698