| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() |
| OLD | NEW |