| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Module containing utility functions for reporting results.""" | 5 """Module containing utility functions for reporting results.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 | 10 |
| 11 from pylib import buildbot_report | |
| 12 from pylib import constants | 11 from pylib import constants |
| 13 | 12 |
| 14 import flakiness_dashboard_results_uploader | 13 import flakiness_dashboard_results_uploader |
| 15 | 14 |
| 16 | 15 |
| 17 def _LogToFile(results, test_type, test_suite, build_type): | 16 def _LogToFile(results, test_type, test_suite, build_type): |
| 18 """Log results to local files which can be used for aggregation later.""" | 17 """Log results to local files which can be used for aggregation later.""" |
| 19 log_file_path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', | 18 log_file_path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', |
| 20 build_type, 'test_logs') | 19 build_type, 'test_logs') |
| 21 if not os.path.exists(log_file_path): | 20 if not os.path.exists(log_file_path): |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 # instrumenation test package using different annotations. | 102 # instrumenation test package using different annotations. |
| 104 if annotation and len(annotation) == 1: | 103 if annotation and len(annotation) == 1: |
| 105 test_suite = annotation[0] | 104 test_suite = annotation[0] |
| 106 else: | 105 else: |
| 107 test_suite = test_package | 106 test_suite = test_package |
| 108 _LogToFile(results, test_type, test_suite, build_type) | 107 _LogToFile(results, test_type, test_suite, build_type) |
| 109 | 108 |
| 110 if flakiness_server: | 109 if flakiness_server: |
| 111 _LogToFlakinessDashboard(results, test_type, test_package, | 110 _LogToFlakinessDashboard(results, test_type, test_package, |
| 112 flakiness_server) | 111 flakiness_server) |
| OLD | NEW |