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 import os | 8 TODO(epoger): In the midst of re-implementing using checksums; |
9 import posixpath | 9 see https://code.google.com/p/skia/issues/detail?id=1942 |
| 10 """ |
| 11 |
10 import sys | 12 import sys |
11 | 13 |
12 from build_step import BuildStep, PLAYBACK_CANNED_ACL | 14 from build_step import BuildStep |
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 | |
19 | 17 |
20 class UploadRenderedSKPs(upload_gm_results.UploadGMResults): | 18 class UploadRenderedSKPs(upload_gm_results.UploadGMResults): |
21 | 19 |
22 def __init__(self, attempts=3, **kwargs): | 20 def __init__(self, attempts=3, **kwargs): |
23 super(UploadRenderedSKPs, self).__init__( | 21 super(UploadRenderedSKPs, self).__init__( |
24 attempts=attempts, **kwargs) | 22 attempts=attempts, **kwargs) |
25 | 23 |
26 def _Run(self): | 24 def _Run(self): |
27 gs_utils.copy_storage_directory( | 25 self._SVNUploadJsonFiles(src_dir=self.skp_out_dir, |
28 src_dir=os.path.abspath(self.playback_actual_images_dir), | 26 dest_subdir='rendered-skps') |
29 dest_dir=posixpath.join( | 27 |
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) | |
37 | 28 |
38 if '__main__' == __name__: | 29 if '__main__' == __name__: |
39 sys.exit(BuildStep.RunBuildStep(UploadRenderedSKPs)) | 30 sys.exit(BuildStep.RunBuildStep(UploadRenderedSKPs)) |
OLD | NEW |