Chromium Code Reviews| 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. |