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

Unified Diff: tools/skp/webpages_playback.py

Issue 1658653002: Upload SKPs to chrome-partner-telemetry (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Fixes Created 4 years, 11 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 | « tools/skp/recreate_skps.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skp/webpages_playback.py
diff --git a/tools/skp/webpages_playback.py b/tools/skp/webpages_playback.py
index 1bd216391184efe11e37c908bbbd838d94cc77e9..ee1b8263ab0d80a5f5a7f0073b320ea89c3a0bca 100644
--- a/tools/skp/webpages_playback.py
+++ b/tools/skp/webpages_playback.py
@@ -71,6 +71,7 @@ from common.py.utils import shell_utils
ROOT_PLAYBACK_DIR_NAME = 'playback'
SKPICTURES_DIR_NAME = 'skps'
+PARTNERS_GS_BUCKET = 'gs://chrome-partner-telemetry'
# Local archive and SKP directories.
LOCAL_PLAYBACK_ROOT_DIR = os.path.join(
@@ -158,6 +159,7 @@ class SkPicturePlayback(object):
self.gs = GoogleStorageDataStore(data_store_location)
else:
self.gs = LocalFileSystemDataStore(data_store_location)
+ self._upload_to_partner_bucket = parse_options.upload_to_partner_bucket
self._alternate_upload_dir = parse_options.alternate_upload_dir
self._telemetry_binaries_dir = os.path.join(parse_options.chrome_src_path,
'tools', 'perf')
@@ -368,6 +370,18 @@ class SkPicturePlayback(object):
print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % (
posixpath.join(self.gs.target_name(), dest_dir_name,
SKPICTURES_DIR_NAME))
+
+ if self._upload_to_partner_bucket:
+ print '\n\n=======Uploading to Partner bucket %s =======\n\n' % (
+ PARTNERS_GS_BUCKET)
+ partner_gs = GoogleStorageDataStore(PARTNERS_GS_BUCKET)
+ partner_gs.upload_dir_contents(
+ os.path.join(LOCAL_PLAYBACK_ROOT_DIR, SKPICTURES_DIR_NAME),
+ dest_dir=posixpath.join(SKPICTURES_DIR_NAME, dest_dir_name),
+ upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED)
+ print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % (
+ posixpath.join(partner_gs.target_name(), SKPICTURES_DIR_NAME,
+ dest_dir_name))
else:
print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type()
print 'Generated resources are available in %s\n\n' % (
@@ -534,6 +548,11 @@ if '__main__' == __name__:
' if this is True.'),
default=False)
option_parser.add_option(
+ '', '--upload_to_partner_bucket', action='store_true',
+ help=('Uploads SKPs to the chrome-partner-telemetry Google Storage '
+ 'bucket if true.'),
+ default=False)
+ option_parser.add_option(
'', '--data_store',
help=('The location of the file storage to use to download and upload '
'files. Can be \'gs://<bucket>\' for Google Storage, or '
« no previous file with comments | « tools/skp/recreate_skps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698