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 ../buildbot/slave/skia_slave_scripts | 10 cd ../buildbot/slave/skia_slave_scripts |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 print '\n\n=======Capturing SKP files took %s seconds=======\n\n' % ( | 288 print '\n\n=======Capturing SKP files took %s seconds=======\n\n' % ( |
289 time.time() - start_time) | 289 time.time() - start_time) |
290 | 290 |
291 if self._skia_tools: | 291 if self._skia_tools: |
292 render_pictures_cmd = [ | 292 render_pictures_cmd = [ |
293 os.path.join(self._skia_tools, 'render_pictures'), | 293 os.path.join(self._skia_tools, 'render_pictures'), |
294 '-r', self._local_skp_dir | 294 '-r', self._local_skp_dir |
295 ] | 295 ] |
296 render_pdfs_cmd = [ | 296 render_pdfs_cmd = [ |
297 os.path.join(self._skia_tools, 'render_pdfs'), | 297 os.path.join(self._skia_tools, 'render_pdfs'), |
298 self._local_skp_dir | 298 '-r', self._local_skp_dir |
299 ] | 299 ] |
300 | 300 |
301 for tools_cmd in (render_pictures_cmd, render_pdfs_cmd): | 301 for tools_cmd in (render_pictures_cmd, render_pdfs_cmd): |
302 print '\n\n=======Running %s=======' % ' '.join(tools_cmd) | 302 print '\n\n=======Running %s=======' % ' '.join(tools_cmd) |
303 proc = subprocess.Popen(tools_cmd) | 303 proc = subprocess.Popen(tools_cmd) |
304 (code, _) = shell_utils.log_process_after_completion(proc, echo=False) | 304 (code, _) = shell_utils.log_process_after_completion(proc, echo=False) |
305 if code != 0: | 305 if code != 0: |
306 raise Exception('%s failed!' % ' '.join(tools_cmd)) | 306 raise Exception('%s failed!' % ' '.join(tools_cmd)) |
307 | 307 |
308 if not self._non_interactive: | 308 if not self._non_interactive: |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 default=None) | 449 default=None) |
450 option_parser.add_option( | 450 option_parser.add_option( |
451 '', '--non-interactive', action='store_true', | 451 '', '--non-interactive', action='store_true', |
452 help='Runs the script without any prompts. If this flag is specified and ' | 452 help='Runs the script without any prompts. If this flag is specified and ' |
453 '--skia_tools is specified then the debugger is not run.', | 453 '--skia_tools is specified then the debugger is not run.', |
454 default=False) | 454 default=False) |
455 options, unused_args = option_parser.parse_args() | 455 options, unused_args = option_parser.parse_args() |
456 | 456 |
457 playback = SkPicturePlayback(options) | 457 playback = SkPicturePlayback(options) |
458 sys.exit(playback.Run()) | 458 sys.exit(playback.Run()) |
OLD | NEW |