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 skia |
11 python webpages_playback.py --dest_gsbase=gs://rmistry --record \ | 11 python tools/skp/webpages_playback.py --dest_gsbase=gs://rmistry --record \ |
12 --page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ | 12 --page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ |
13 --browser_executable=/tmp/chromium/out/Release/chrome | 13 --browser_executable=/tmp/chromium/out/Release/chrome |
14 | 14 |
15 | 15 |
16 To replay archived webpages and re-generate SKP files (should be run whenever | 16 To replay archived webpages and re-generate SKP files (should be run whenever |
17 SkPicture.PICTURE_VERSION changes): | 17 SkPicture.PICTURE_VERSION changes): |
18 | 18 |
19 cd ../buildbot/slave/skia_slave_scripts | 19 cd skia |
20 python webpages_playback.py --dest_gsbase=gs://rmistry \ | 20 python tools/skp/webpages_playback.py --dest_gsbase=gs://rmistry \ |
21 --page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ | 21 --page_sets=all --skia_tools=/home/default/trunk/out/Debug/ \ |
22 --browser_executable=/tmp/chromium/out/Release/chrome | 22 --browser_executable=/tmp/chromium/out/Release/chrome |
23 | 23 |
24 | 24 |
25 Specify the --page_sets flag (default value is 'all') to pick a list of which | 25 Specify the --page_sets flag (default value is 'all') to pick a list of which |
26 webpages should be archived and/or replayed. Eg: | 26 webpages should be archived and/or replayed. Eg: |
27 | 27 |
28 --page_sets=page_sets/skia_yahooanswers_desktop.json,\ | 28 --page_sets=tools/skp/page_sets/skia_yahooanswers_desktop.py,\ |
29 page_sets/skia_wikipedia_galaxynexus.json | 29 tools/skp/page_sets/skia_googlecalendar_nexus10.py |
30 | 30 |
31 The --browser_executable flag should point to the browser binary you want to use | 31 The --browser_executable flag should point to the browser binary you want to use |
32 to capture archives and/or capture SKP files. Majority of the time it should be | 32 to capture archives and/or capture SKP files. Majority of the time it should be |
33 a newly built chrome binary. | 33 a newly built chrome binary. |
34 | 34 |
35 The --upload_to_gs flag controls whether generated artifacts will be uploaded | 35 The --upload_to_gs flag controls whether generated artifacts will be uploaded |
36 to Google Storage (default value is False if not specified). | 36 to Google Storage (default value is False if not specified). |
37 | 37 |
38 The --non-interactive flag controls whether the script will prompt the user | 38 The --non-interactive flag controls whether the script will prompt the user |
39 (default value is False if not specified). | 39 (default value is False if not specified). |
40 | 40 |
41 The --skia_tools flag if specified will allow this script to run | 41 The --skia_tools flag if specified will allow this script to run |
42 debugger, render_pictures, and render_pdfs on the captured | 42 debugger, render_pictures, and render_pdfs on the captured |
43 SKP(s). The tools are run after all SKPs are succesfully captured to make sure | 43 SKP(s). The tools are run after all SKPs are succesfully captured to make sure |
44 they can be added to the buildbots with no breakages. | 44 they can be added to the buildbots with no breakages. |
45 To preview the captured SKP before proceeding to the next page_set specify both | |
46 --skia_tools and --view_debugger_output. | |
47 """ | 45 """ |
48 | 46 |
49 import glob | 47 import glob |
50 import optparse | 48 import optparse |
51 import os | 49 import os |
52 import posixpath | 50 import posixpath |
53 import shutil | 51 import shutil |
54 import subprocess | 52 import subprocess |
55 import sys | 53 import sys |
56 import tempfile | 54 import tempfile |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 default=None) | 451 default=None) |
454 option_parser.add_option( | 452 option_parser.add_option( |
455 '', '--non-interactive', action='store_true', | 453 '', '--non-interactive', action='store_true', |
456 help='Runs the script without any prompts. If this flag is specified and ' | 454 help='Runs the script without any prompts. If this flag is specified and ' |
457 '--skia_tools is specified then the debugger is not run.', | 455 '--skia_tools is specified then the debugger is not run.', |
458 default=False) | 456 default=False) |
459 options, unused_args = option_parser.parse_args() | 457 options, unused_args = option_parser.parse_args() |
460 | 458 |
461 playback = SkPicturePlayback(options) | 459 playback = SkPicturePlayback(options) |
462 sys.exit(playback.Run()) | 460 sys.exit(playback.Run()) |
OLD | NEW |