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

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: Rebase expectations due to step name change 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..ddc85a617855aa1f7bb0835703c8fc81ca2432a5 100644
--- a/scripts/slave/recipe_modules/ct_swarming/api.py
+++ b/scripts/slave/recipe_modules/ct_swarming/api.py
@@ -69,7 +69,7 @@ os.chmod('%s', os.stat('%s').st_mode | stat.S_IEXEC)
"""
# Download page sets.
page_sets_dir = self.downloads_dir.join('slave%s' % slave_num, 'page_sets')
- self.m.file.makedirs('Create page_sets dir', page_sets_dir)
+ self.m.file.makedirs('page_sets dir', page_sets_dir)
self.m.gsutil.download(
bucket=CT_GS_BUCKET,
source='swarming/page_sets/%s/slave%s/*' % (page_type, slave_num),
@@ -77,13 +77,32 @@ os.chmod('%s', os.stat('%s').st_mode | stat.S_IEXEC)
# Download archives.
wpr_dir = page_sets_dir.join('data')
- self.m.file.makedirs('Create WPR dir', wpr_dir)
+ self.m.file.makedirs('WPR dir', wpr_dir)
self.m.gsutil.download(
bucket=CT_GS_BUCKET,
source='swarming/webpage_archives/%s/slave%s/*' % (page_type,
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.rmtree('SKPs dir', skps_dir)
+ self.m.file.makedirs('SKPs dir', skps_dir)
+ 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.
@@ -100,7 +119,7 @@ os.chmod('%s', os.stat('%s').st_mode | stat.S_IEXEC)
Returns:
Path to the isolated.gen.json file.
"""
- self.m.file.makedirs('Create swarming tmp dir', self.swarming_temp_dir)
+ self.m.file.makedirs('swarming tmp dir', self.swarming_temp_dir)
isolated_path = self.swarming_temp_dir.join(
'ct-task-%s.isolated' % slave_num)
isolate_args = [
« no previous file with comments | « masters/master.client.skia.fyi/slaves.cfg ('k') | scripts/slave/recipes/perf/ct_top1k_perf.expected/CT_Top1k_RR.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698