OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import collections | 6 import collections |
7 import glob | 7 import glob |
8 import hashlib | 8 import hashlib |
9 import json | 9 import json |
10 import multiprocessing | 10 import multiprocessing |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 | 263 |
264 exit_code = RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py'] + | 264 exit_code = RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py'] + |
265 cmd_args) | 265 cmd_args) |
266 if exit_code == 254: # AKA -1, internal error. | 266 if exit_code == 254: # AKA -1, internal error. |
267 bb_annotations.PrintMsg('?? (crashed or hung)') | 267 bb_annotations.PrintMsg('?? (crashed or hung)') |
268 else: | 268 else: |
269 full_results_path = os.path.join('..', 'layout-test-results', | 269 full_results_path = os.path.join('..', 'layout-test-results', |
270 'full_results.json') | 270 'full_results.json') |
271 if os.path.exists(full_results_path): | 271 if os.path.exists(full_results_path): |
272 full_results = json.load(open(full_results_path)) | 272 full_results = json.load(open(full_results_path)) |
273 unexpected_failures, unexpected_flakes, unexpected_passes = ( | 273 unexpected_passes, unexpected_flakes, unexpected_failures = ( |
Dirk Pranke
2013/10/10 18:47:20
This is the important change.
landing w/o try jo
| |
274 _ParseLayoutTestResults(full_results)) | 274 _ParseLayoutTestResults(full_results)) |
275 if unexpected_failures: | 275 if unexpected_failures: |
276 _PrintDashboardLink('failed', unexpected_failures, | 276 _PrintDashboardLink('failed', unexpected_failures, |
277 max_tests=25) | 277 max_tests=25) |
278 elif unexpected_passes: | 278 elif unexpected_passes: |
279 _PrintDashboardLink('unexpected passes', unexpected_passes, | 279 _PrintDashboardLink('unexpected passes', unexpected_passes, |
280 max_tests=10) | 280 max_tests=10) |
281 if unexpected_flakes: | 281 if unexpected_flakes: |
282 _PrintDashboardLink('unexpected flakes', unexpected_flakes, | 282 _PrintDashboardLink('unexpected flakes', unexpected_flakes, |
283 max_tests=10) | 283 max_tests=10) |
284 | |
285 if exit_code == 0 and (unexpected_passes or unexpected_flakes): | |
286 # If exit_code != 0, RunCmd() will have already printed an error. | |
287 bb_annotations.PrintWarning() | |
284 else: | 288 else: |
289 bb_annotations.PrintError() | |
285 bb_annotations.PrintMsg('?? (results missing)') | 290 bb_annotations.PrintMsg('?? (results missing)') |
286 | 291 |
287 if options.factory_properties.get('archive_webkit_results', False): | 292 if options.factory_properties.get('archive_webkit_results', False): |
288 bb_annotations.PrintNamedStep('archive_webkit_results') | 293 bb_annotations.PrintNamedStep('archive_webkit_results') |
289 base = 'https://storage.googleapis.com/chromium-layout-test-archives' | 294 base = 'https://storage.googleapis.com/chromium-layout-test-archives' |
290 builder_name = options.build_properties.get('buildername', '') | 295 builder_name = options.build_properties.get('buildername', '') |
291 build_number = str(options.build_properties.get('buildnumber', '')) | 296 build_number = str(options.build_properties.get('buildnumber', '')) |
292 results_link = '%s/%s/%s/layout-test-results/results.html' % ( | 297 results_link = '%s/%s/%s/layout-test-results/results.html' % ( |
293 base, EscapeBuilderName(builder_name), build_number) | 298 base, EscapeBuilderName(builder_name), build_number) |
294 bb_annotations.PrintLink('results', results_link) | 299 bb_annotations.PrintLink('results', results_link) |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
569 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 574 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
570 if options.coverage_bucket: | 575 if options.coverage_bucket: |
571 setattr(options, 'coverage_dir', | 576 setattr(options, 'coverage_dir', |
572 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 577 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
573 | 578 |
574 MainTestWrapper(options) | 579 MainTestWrapper(options) |
575 | 580 |
576 | 581 |
577 if __name__ == '__main__': | 582 if __name__ == '__main__': |
578 sys.exit(main(sys.argv)) | 583 sys.exit(main(sys.argv)) |
OLD | NEW |