| 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 """A tool to archive layout test results generated by buildbots. | 6 """A tool to archive layout test results generated by buildbots. |
| 7 | 7 |
| 8 Actual result files (*-actual.txt), but not results from simplified diff | 8 Actual result files (*-actual.txt), but not results from simplified diff |
| 9 tests (*-simp-actual.txt) or JS-filtered diff tests (*-jsfilt.txt), will | 9 tests (*-simp-actual.txt) or JS-filtered diff tests (*-jsfilt.txt), will |
| 10 be included in the archive. | 10 be included in the archive. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 staging_dir = options.staging_dir or slave_utils.GetStagingDir(chrome_dir) | 160 staging_dir = options.staging_dir or slave_utils.GetStagingDir(chrome_dir) |
| 161 print 'Staging in %s' % staging_dir | 161 print 'Staging in %s' % staging_dir |
| 162 if not os.path.exists(staging_dir): | 162 if not os.path.exists(staging_dir): |
| 163 os.makedirs(staging_dir) | 163 os.makedirs(staging_dir) |
| 164 | 164 |
| 165 (actual_file_list, diff_file_list) = _CollectArchiveFiles(options.results_dir) | 165 (actual_file_list, diff_file_list) = _CollectArchiveFiles(options.results_dir) |
| 166 zip_file = chromium_utils.MakeZip(staging_dir, | 166 zip_file = chromium_utils.MakeZip(staging_dir, |
| 167 results_dir_basename, | 167 results_dir_basename, |
| 168 actual_file_list, | 168 actual_file_list, |
| 169 options.results_dir)[1] | 169 options.results_dir)[1] |
| 170 # TODO(ojan): Stop separately uploading full_results.json once garden-o-matic | 170 # TODO(crbug.com/655202): Stop separately uploading failing_results.json. |
| 171 # switches to using failing_results.json. | |
| 172 full_results_json = os.path.join(options.results_dir, 'full_results.json') | 171 full_results_json = os.path.join(options.results_dir, 'full_results.json') |
| 173 failing_results_json = os.path.join(options.results_dir, | 172 failing_results_json = os.path.join(options.results_dir, |
| 174 'failing_results.json') | 173 'failing_results.json') |
| 175 | 174 |
| 176 # Extract the build name of this slave (e.g., 'chrome-release') from its | 175 # Extract the build name of this slave (e.g., 'chrome-release') from its |
| 177 # configuration file if not provided as a param. | 176 # configuration file if not provided as a param. |
| 178 build_name = options.builder_name or slave_utils.SlaveBuildName(chrome_dir) | 177 build_name = options.builder_name or slave_utils.SlaveBuildName(chrome_dir) |
| 179 build_name = re.sub('[ .()]', '_', build_name) | 178 build_name = re.sub('[ .()]', '_', build_name) |
| 180 | 179 |
| 181 wc_dir = os.path.dirname(chrome_dir) | 180 wc_dir = os.path.dirname(chrome_dir) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 if not options.gs_bucket: | 282 if not options.gs_bucket: |
| 284 options.gs_bucket = options.factory_properties.get('gs_bucket') | 283 options.gs_bucket = options.factory_properties.get('gs_bucket') |
| 285 if not options.gs_acl: | 284 if not options.gs_acl: |
| 286 options.gs_acl = options.factory_properties.get('gs_acl') | 285 options.gs_acl = options.factory_properties.get('gs_acl') |
| 287 | 286 |
| 288 return archive_layout(options, args) | 287 return archive_layout(options, args) |
| 289 | 288 |
| 290 | 289 |
| 291 if '__main__' == __name__: | 290 if '__main__' == __name__: |
| 292 sys.exit(main()) | 291 sys.exit(main()) |
| OLD | NEW |