OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Archives or replays webpages and creates SKPs in a Google Storage location. | 6 """Archives or replays webpages and creates SKPs in a Google Storage location. |
7 | 7 |
8 To archive webpages and store SKP files (archives should be rarely updated): | 8 To archive webpages and store SKP files (archives should be rarely updated): |
9 | 9 |
10 cd skia | 10 cd skia |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 print '\n\n' | 350 print '\n\n' |
351 | 351 |
352 if self._upload: | 352 if self._upload: |
353 print '\n\n=======Uploading to %s=======\n\n' % self.gs.target_type() | 353 print '\n\n=======Uploading to %s=======\n\n' % self.gs.target_type() |
354 # Copy the directory structure in the root directory into Google Storage. | 354 # Copy the directory structure in the root directory into Google Storage. |
355 dest_dir_name = ROOT_PLAYBACK_DIR_NAME | 355 dest_dir_name = ROOT_PLAYBACK_DIR_NAME |
356 if self._alternate_upload_dir: | 356 if self._alternate_upload_dir: |
357 dest_dir_name = self._alternate_upload_dir | 357 dest_dir_name = self._alternate_upload_dir |
358 | 358 |
359 self.gs.upload_dir_contents( | 359 self.gs.upload_dir_contents( |
360 LOCAL_PLAYBACK_ROOT_DIR, dest_dir_name, | 360 LOCAL_PLAYBACK_ROOT_DIR, dest_dir=dest_dir_name, |
361 upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED, | 361 upload_if=gs_utils.GSUtils.UploadIf.IF_MODIFIED, |
362 predefined_acl=GS_PREDEFINED_ACL, | 362 predefined_acl=GS_PREDEFINED_ACL, |
363 fine_grained_acl_list=GS_FINE_GRAINED_ACL_LIST) | 363 fine_grained_acl_list=GS_FINE_GRAINED_ACL_LIST) |
364 | 364 |
365 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % ( | 365 print '\n\n=======New SKPs have been uploaded to %s =======\n\n' % ( |
366 posixpath.join(self.gs.target_name(), dest_dir_name, | 366 posixpath.join(self.gs.target_name(), dest_dir_name, |
367 SKPICTURES_DIR_NAME)) | 367 SKPICTURES_DIR_NAME)) |
368 else: | 368 else: |
369 print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type() | 369 print '\n\n=======Not Uploading to %s=======\n\n' % self.gs.target_type() |
370 print 'Generated resources are available in %s\n\n' % ( | 370 print 'Generated resources are available in %s\n\n' % ( |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 default=None) | 550 default=None) |
551 option_parser.add_option( | 551 option_parser.add_option( |
552 '', '--non-interactive', action='store_true', | 552 '', '--non-interactive', action='store_true', |
553 help='Runs the script without any prompts. If this flag is specified and ' | 553 help='Runs the script without any prompts. If this flag is specified and ' |
554 '--skia_tools is specified then the debugger is not run.', | 554 '--skia_tools is specified then the debugger is not run.', |
555 default=False) | 555 default=False) |
556 options, unused_args = option_parser.parse_args() | 556 options, unused_args = option_parser.parse_args() |
557 | 557 |
558 playback = SkPicturePlayback(options) | 558 playback = SkPicturePlayback(options) |
559 sys.exit(playback.Run()) | 559 sys.exit(playback.Run()) |
OLD | NEW |