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

Side by Side Diff: scripts/slave/chromium/archive_layout_test_results.py

Issue 2419133002: Revert of Use passed-in --build-dir instead of GetBuildOutputDirectory in ... (Closed)
Patch Set: Created 4 years, 2 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
« 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/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 13 matching lines...) Expand all
24 24
25 import logging 25 import logging
26 import optparse 26 import optparse
27 import os 27 import os
28 import re 28 import re
29 import socket 29 import socket
30 import sys 30 import sys
31 31
32 from common import archive_utils 32 from common import archive_utils
33 from common import chromium_utils 33 from common import chromium_utils
34 from slave import build_directory
34 from slave import slave_utils 35 from slave import slave_utils
35 36
36 # Directory name, above the build directory, in which test results can be 37 # Directory name, above the build directory, in which test results can be
37 # found if no --results-dir option is given. 38 # found if no --results-dir option is given.
38 RESULT_DIR = 'layout-test-results' 39 RESULT_DIR = 'layout-test-results'
39 40
40 41
41 def _CollectArchiveFiles(output_dir): 42 def _CollectArchiveFiles(output_dir):
42 """Returns a pair of lists of file paths to archive. 43 """Returns a pair of lists of file paths to archive.
43 44
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 _CopyFileToArchiveHost(full_results_json, dest_dir) 254 _CopyFileToArchiveHost(full_results_json, dest_dir)
254 _CopyFileToArchiveHost(failing_results_json, dest_dir) 255 _CopyFileToArchiveHost(failing_results_json, dest_dir)
255 # Not supported on Google Storage yet. 256 # Not supported on Google Storage yet.
256 _ArchiveFullLayoutTestResults(staging_dir, dest_parent_dir, diff_file_list, 257 _ArchiveFullLayoutTestResults(staging_dir, dest_parent_dir, diff_file_list,
257 options) 258 options)
258 return 0 259 return 0
259 260
260 261
261 def _ParseOptions(): 262 def _ParseOptions():
262 option_parser = optparse.OptionParser() 263 option_parser = optparse.OptionParser()
263 option_parser.add_option('', '--build-dir', 264 option_parser.add_option('', '--build-dir', help='ignored')
264 help='Build dir path, relative to checkout root.')
265 option_parser.add_option('', '--results-dir', 265 option_parser.add_option('', '--results-dir',
266 help='path to layout test results, relative to ' 266 help='path to layout test results, relative to '
267 'the build_dir') 267 'the build_dir')
268 option_parser.add_option('', '--builder-name', 268 option_parser.add_option('', '--builder-name',
269 default=None, 269 default=None,
270 help='The name of the builder running this script.') 270 help='The name of the builder running this script.')
271 option_parser.add_option('', '--build-number', 271 option_parser.add_option('', '--build-number',
272 default=None, 272 default=None,
273 help=('The build number of the builder running' 273 help=('The build number of the builder running'
274 'this script.')) 274 'this script.'))
275 option_parser.add_option('', '--gs-bucket', 275 option_parser.add_option('', '--gs-bucket',
276 default=None, 276 default=None,
277 help=('The google storage bucket to upload to. ' 277 help=('The google storage bucket to upload to. '
278 'If provided, this script will upload to gs ' 278 'If provided, this script will upload to gs '
279 'instead of the master.')) 279 'instead of the master.'))
280 option_parser.add_option('', '--gs-acl', 280 option_parser.add_option('', '--gs-acl',
281 default=None, 281 default=None,
282 help=('The ACL of the google storage files.')) 282 help=('The ACL of the google storage files.'))
283 option_parser.add_option('--staging-dir', 283 option_parser.add_option('--staging-dir',
284 help='Directory to use for staging the archives. ' 284 help='Directory to use for staging the archives. '
285 'Default behavior is to automatically detect ' 285 'Default behavior is to automatically detect '
286 'slave\'s build directory.') 286 'slave\'s build directory.')
287 chromium_utils.AddPropertiesOptions(option_parser) 287 chromium_utils.AddPropertiesOptions(option_parser)
288 options, _ = option_parser.parse_args() 288 options, _ = option_parser.parse_args()
289 options.build_dir = build_directory.GetBuildOutputDirectory()
289 return options 290 return options
290 291
291 292
292 def main(): 293 def main():
293 options = _ParseOptions() 294 options = _ParseOptions()
294 logging.basicConfig(level=logging.INFO, 295 logging.basicConfig(level=logging.INFO,
295 format='%(asctime)s %(filename)s:%(lineno)-3d' 296 format='%(asctime)s %(filename)s:%(lineno)-3d'
296 ' %(levelname)s %(message)s', 297 ' %(levelname)s %(message)s',
297 datefmt='%y%m%d %H:%M:%S') 298 datefmt='%y%m%d %H:%M:%S')
298 return archive_layout(options) 299 return archive_layout(options)
299 300
300 301
301 if '__main__' == __name__: 302 if '__main__' == __name__:
302 sys.exit(main()) 303 sys.exit(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