diff options
author | borenet <borenet@chromium.org> | 2016-07-25 05:18:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-25 05:18:15 -0700 |
commit | 2869847166170c4f5b5ba3a9f37682a1faf191df (patch) | |
tree | 29b728a7bfa565fa29a439859d8ddcef21933c6f | |
parent | 1638c0deea80e4a580fe43babeb04279dd163e98 (diff) |
webpages_playback: Make --upload_to_partner_bucket work without --upload
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182463002
Review-Url: https://codereview.chromium.org/2182463002
-rw-r--r-- | tools/skp/webpages_playback.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/skp/webpages_playback.py b/tools/skp/webpages_playback.py index 8e78e0d31e..3d9e20bd02 100644 --- a/tools/skp/webpages_playback.py +++ b/tools/skp/webpages_playback.py @@ -376,22 +376,23 @@ class SkPicturePlayback(object): 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.delete_path(SKPICTURES_DIR_NAME) - partner_gs.upload_dir_contents( - os.path.join(LOCAL_PLAYBACK_ROOT_DIR, SKPICTURES_DIR_NAME), - dest_dir=SKPICTURES_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)) else: print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type() print 'Generated resources are available in %s\n\n' % ( LOCAL_PLAYBACK_ROOT_DIR) + 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.delete_path(SKPICTURES_DIR_NAME) + partner_gs.upload_dir_contents( + os.path.join(LOCAL_PLAYBACK_ROOT_DIR, SKPICTURES_DIR_NAME), + dest_dir=SKPICTURES_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)) + return 0 def _GetSkiaSkpFileName(self, page_set): |