diff options
author | rmistry <rmistry@google.com> | 2016-02-03 07:08:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-03 07:08:02 -0800 |
commit | 37ed996f2d8960763578925a0a8210c59d59d8b0 (patch) | |
tree | aeda8e2fd3649cff5a41dca9b50b888a518ab5a1 /tools/skp | |
parent | 84b8d897c22144c52ee65fc29ca6580a5e2fcb73 (diff) |
Do not upload to trusted partner's bucket if it is a dry run
BUG=skia:3751
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1665803002
# Trybots do not exercise this code.
NOTRY=true
Review URL: https://codereview.chromium.org/1665803002
Diffstat (limited to 'tools/skp')
-rw-r--r-- | tools/skp/recreate_skps.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/skp/recreate_skps.py b/tools/skp/recreate_skps.py index 4641277130..b7ca07a9a7 100644 --- a/tools/skp/recreate_skps.py +++ b/tools/skp/recreate_skps.py @@ -36,8 +36,9 @@ def _get_skp_version(): new_version += 1 -def main(chrome_src_path, browser_executable): +def main(chrome_src_path, browser_executable, dry_run): browser_executable = os.path.realpath(browser_executable) + dry_run = (dry_run == 'True') skp_version = _get_skp_version() print 'SKP_VERSION=%d' % skp_version @@ -58,10 +59,11 @@ def main(chrome_src_path, browser_executable): '--browser_executable', browser_executable, '--non-interactive', '--upload', - '--upload_to_partner_bucket', '--alternate_upload_dir', upload_dir, '--chrome_src_path', chrome_src_path, ] + if not dry_run: + webpages_playback_cmd.append('--upload_to_partner_bucket') try: shell_utils.run(webpages_playback_cmd) @@ -87,7 +89,8 @@ def main(chrome_src_path, browser_executable): if '__main__' == __name__: - if len(sys.argv) != 3: - print >> sys.stderr, 'USAGE: %s <chrome src path> <browser executable>' + if len(sys.argv) != 4: + print >> sys.stderr, ('USAGE: %s <chrome src path> <browser executable> ' + '<dry run>') sys.exit(1) main(*sys.argv[1:]) |