Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: tools/perf/page_sets/PRESUBMIT.py

Issue 128653005: [telemetry] Update examples so they work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests that were broken earlier. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/perf/page_sets/presubmit_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import re 6 import re
7 import sys 7 import sys
8 8
9 9
10 def LoadSupport(input_api): 10 def LoadSupport(input_api):
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 results.append(output_api.PresubmitError( 74 results.append(output_api.PresubmitError(
75 'Hash file exists, but file not found: %s' % hash_path)) 75 'Hash file exists, but file not found: %s' % hash_path))
76 continue 76 continue
77 if cloud_storage.GetHash(file_path) != file_hash: 77 if cloud_storage.GetHash(file_path) != file_hash:
78 results.append(output_api.PresubmitError( 78 results.append(output_api.PresubmitError(
79 'Hash file does not match file\'s actual hash: %s' % hash_path)) 79 'Hash file does not match file\'s actual hash: %s' % hash_path))
80 continue 80 continue
81 81
82 try: 82 try:
83 bucket_input = raw_input('Uploading to Cloud Storage: %s\n' 83 bucket_input = raw_input('Uploading to Cloud Storage: %s\n'
84 'Is this file [p]ublic or Google-[i]nternal?' 84 'Is this file [P]ublic or Google-[i]nternal?'
85 % file_path).lower() 85 % file_path).lower()
86 if 'public'.startswith(bucket_input): 86 if 'public'.startswith(bucket_input):
87 bucket = cloud_storage.PUBLIC_BUCKET 87 bucket = cloud_storage.PUBLIC_BUCKET
88 elif ('internal'.startswith(bucket_input) or 88 elif ('internal'.startswith(bucket_input) or
89 'google-internal'.startswith(bucket_input)): 89 'google-internal'.startswith(bucket_input)):
90 bucket = cloud_storage.INTERNAL_BUCKET 90 bucket = cloud_storage.INTERNAL_BUCKET
91 else: 91 else:
92 results.append(output_api.PresubmitError( 92 results.append(output_api.PresubmitError(
93 'Response was neither "public" nor "internal": %s' % bucket_input)) 93 'Response was neither "public" nor "internal": %s' % bucket_input))
94 return results 94 return results
(...skipping 20 matching lines...) Expand all
115 'data file is not in Cloud Storage: %s' % hash_path)) 115 'data file is not in Cloud Storage: %s' % hash_path))
116 return results 116 return results
117 117
118 118
119 def CheckChangeOnUpload(input_api, output_api): 119 def CheckChangeOnUpload(input_api, output_api):
120 return _SyncFilesToCloud(input_api, output_api) 120 return _SyncFilesToCloud(input_api, output_api)
121 121
122 122
123 def CheckChangeOnCommit(input_api, output_api): 123 def CheckChangeOnCommit(input_api, output_api):
124 return _VerifyFilesInCloud(input_api, output_api) 124 return _VerifyFilesInCloud(input_api, output_api)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698