| 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 os | 10 import os |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS | 333 elif exit_code == 253: # test_run_results.NO_TESTS_EXIT_STATUS |
| 334 bb_annotations.PrintMsg('?? (no tests found)') | 334 bb_annotations.PrintMsg('?? (no tests found)') |
| 335 else: | 335 else: |
| 336 full_results_path = os.path.join('..', 'layout-test-results', | 336 full_results_path = os.path.join('..', 'layout-test-results', |
| 337 'full_results.json') | 337 'full_results.json') |
| 338 if os.path.exists(full_results_path): | 338 if os.path.exists(full_results_path): |
| 339 full_results = json.load(open(full_results_path)) | 339 full_results = json.load(open(full_results_path)) |
| 340 unexpected_passes, unexpected_failures, unexpected_flakes = ( | 340 unexpected_passes, unexpected_failures, unexpected_flakes = ( |
| 341 _ParseLayoutTestResults(full_results)) | 341 _ParseLayoutTestResults(full_results)) |
| 342 if unexpected_failures: | 342 if unexpected_failures: |
| 343 _PrintDashboardLink('failed', unexpected_failures, | 343 _PrintDashboardLink('failed', unexpected_failures.keys(), |
| 344 max_tests=25) | 344 max_tests=25) |
| 345 elif unexpected_passes: | 345 elif unexpected_passes: |
| 346 _PrintDashboardLink('unexpected passes', unexpected_passes, | 346 _PrintDashboardLink('unexpected passes', unexpected_passes.keys(), |
| 347 max_tests=10) | 347 max_tests=10) |
| 348 if unexpected_flakes: | 348 if unexpected_flakes: |
| 349 _PrintDashboardLink('unexpected flakes', unexpected_flakes, | 349 _PrintDashboardLink('unexpected flakes', unexpected_flakes.keys(), |
| 350 max_tests=10) | 350 max_tests=10) |
| 351 | 351 |
| 352 if exit_code == 0 and (unexpected_passes or unexpected_flakes): | 352 if exit_code == 0 and (unexpected_passes or unexpected_flakes): |
| 353 # If exit_code != 0, RunCmd() will have already printed an error. | 353 # If exit_code != 0, RunCmd() will have already printed an error. |
| 354 bb_annotations.PrintWarning() | 354 bb_annotations.PrintWarning() |
| 355 else: | 355 else: |
| 356 bb_annotations.PrintError() | 356 bb_annotations.PrintError() |
| 357 bb_annotations.PrintMsg('?? (results missing)') | 357 bb_annotations.PrintMsg('?? (results missing)') |
| 358 | 358 |
| 359 if options.factory_properties.get('archive_webkit_results', False): | 359 if options.factory_properties.get('archive_webkit_results', False): |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 | 747 |
| 748 if options.coverage_bucket: | 748 if options.coverage_bucket: |
| 749 setattr(options, 'coverage_dir', | 749 setattr(options, 'coverage_dir', |
| 750 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 750 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 751 | 751 |
| 752 MainTestWrapper(options) | 752 MainTestWrapper(options) |
| 753 | 753 |
| 754 | 754 |
| 755 if __name__ == '__main__': | 755 if __name__ == '__main__': |
| 756 sys.exit(main(sys.argv)) | 756 sys.exit(main(sys.argv)) |
| OLD | NEW |