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

Side by Side Diff: gm/rebaseline_server/download_actuals.py

Issue 789253002: Remove MULTILINE, ^, and $ from re finding actual_results.json. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Download actual GM results for a particular builder. 9 Download actual GM results for a particular builder.
10 """ 10 """
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 {builder:string -> ActualLocation} 155 {builder:string -> ActualLocation}
156 156
157 e.g. 157 e.g.
158 {'Test-Android-Xoom-Tegra2-Arm7-Release': ( 158 {'Test-Android-Xoom-Tegra2-Arm7-Release': (
159 'chromium-skia-gm-summaries', 159 'chromium-skia-gm-summaries',
160 'Test-Android-Xoom-Tegra2-Arm7-Release-Trybot/actual-results.json', 160 'Test-Android-Xoom-Tegra2-Arm7-Release-Trybot/actual-results.json',
161 '1415041165535000')} 161 '1415041165535000')}
162 """ 162 """
163 result = dict() 163 result = dict()
164 json_filename_re = re.compile( 164 json_filename_re = re.compile(
165 '^Created: gs://([^/]+)/((?:[^/]+/)+%s)#(\d+)$' 165 'Created: gs://([^/]+)/((?:[^/]+/)+%s)#(\d+)'
166 % re.escape(self._json_filename), re.MULTILINE) 166 % re.escape(self._json_filename))
167 codereview_api_url = 'https://codereview.chromium.org/api' 167 codereview_api_url = 'https://codereview.chromium.org/api'
168 upload_gm_step_url = '/steps/Upload GM Results/logs/stdio' 168 upload_gm_step_url = '/steps/Upload GM Results/logs/stdio'
169 169
170 logging.info('Fetching issue %s ...' % (self._issue,)) 170 logging.info('Fetching issue %s ...' % (self._issue,))
171 json_issue_url = '%s/%s' % (codereview_api_url, self._issue) 171 json_issue_url = '%s/%s' % (codereview_api_url, self._issue)
172 json_issue_data = urllib2.urlopen(json_issue_url).read() 172 json_issue_data = urllib2.urlopen(json_issue_url).read()
173 issue_dict = gm_json.LoadFromString(json_issue_data) 173 issue_dict = gm_json.LoadFromString(json_issue_data)
174 174
175 patchsets = issue_dict.get("patchsets", []) 175 patchsets = issue_dict.get("patchsets", [])
176 patchset = patchsets[-1] 176 patchset = patchsets[-1]
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 remaining_args) 280 remaining_args)
281 281
282 downloader = Download(actuals_base_url=params.actuals_base_url) 282 downloader = Download(actuals_base_url=params.actuals_base_url)
283 downloader.fetch(builder_name=params.builder, 283 downloader.fetch(builder_name=params.builder,
284 dest_dir=params.dest_dir) 284 dest_dir=params.dest_dir)
285 285
286 286
287 287
288 if __name__ == '__main__': 288 if __name__ == '__main__':
289 main() 289 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698