OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Uploads the results of render_skps.py. | 6 """Uploads the results of render_skps.py.""" |
7 | 7 |
8 TODO(epoger): In the midst of re-implementing using checksums; | 8 import os |
9 see https://code.google.com/p/skia/issues/detail?id=1942 | 9 import posixpath |
10 """ | |
11 | |
12 import sys | 10 import sys |
13 | 11 |
14 from build_step import BuildStep | 12 from build_step import BuildStep, PLAYBACK_CANNED_ACL |
| 13 from utils import gs_utils |
| 14 import skia_vars |
15 import upload_gm_results | 15 import upload_gm_results |
16 | 16 |
| 17 SUBDIR_NAME = 'rendered-skps' |
| 18 |
17 | 19 |
18 class UploadRenderedSKPs(upload_gm_results.UploadGMResults): | 20 class UploadRenderedSKPs(upload_gm_results.UploadGMResults): |
19 | 21 |
20 def __init__(self, attempts=3, **kwargs): | 22 def __init__(self, attempts=3, **kwargs): |
21 super(UploadRenderedSKPs, self).__init__( | 23 super(UploadRenderedSKPs, self).__init__( |
22 attempts=attempts, **kwargs) | 24 attempts=attempts, **kwargs) |
23 | 25 |
24 def _Run(self): | 26 def _Run(self): |
25 self._SVNUploadJsonFiles(src_dir=self.skp_out_dir, | 27 gs_utils.copy_storage_directory( |
26 dest_subdir='rendered-skps') | 28 src_dir=os.path.abspath(self.playback_actual_images_dir), |
27 | 29 dest_dir=posixpath.join( |
| 30 skia_vars.GetGlobalVariable('googlestorage_bucket'), SUBDIR_NAME), |
| 31 gs_acl=PLAYBACK_CANNED_ACL) |
| 32 # TODO(epoger): Change ACLs of files uploaded to Google Storage to |
| 33 # google.com:READ . See _SetGoogleReadACLs() in |
| 34 # https://skia.googlesource.com/buildbot/+/master/slave/skia_slave_scripts/w
ebpages_playback.py |
| 35 self._SVNUploadJsonFiles(src_dir=self.playback_actual_summaries_dir, |
| 36 dest_subdir=SUBDIR_NAME) |
28 | 37 |
29 if '__main__' == __name__: | 38 if '__main__' == __name__: |
30 sys.exit(BuildStep.RunBuildStep(UploadRenderedSKPs)) | 39 sys.exit(BuildStep.RunBuildStep(UploadRenderedSKPs)) |
OLD | NEW |