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 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 """ | 83 """ |
84 if not results.DidRunPass(): | 84 if not results.DidRunPass(): |
85 logging.critical('*' * 80) | 85 logging.critical('*' * 80) |
86 logging.critical('Detailed Logs') | 86 logging.critical('Detailed Logs') |
87 logging.critical('*' * 80) | 87 logging.critical('*' * 80) |
88 for line in results.GetLogs().splitlines(): | 88 for line in results.GetLogs().splitlines(): |
89 logging.critical(line) | 89 logging.critical(line) |
90 logging.critical('*' * 80) | 90 logging.critical('*' * 80) |
91 logging.critical('Summary') | 91 logging.critical('Summary') |
92 logging.critical('*' * 80) | 92 logging.critical('*' * 80) |
93 for line in results.GetLongForm().splitlines(): | 93 for line in results.GetGtestForm().splitlines(): |
94 logging.critical(line) | 94 logging.critical(line) |
95 logging.critical('*' * 80) | 95 logging.critical('*' * 80) |
96 | 96 |
97 if os.environ.get('BUILDBOT_BUILDERNAME'): | 97 if os.environ.get('BUILDBOT_BUILDERNAME'): |
98 # It is possible to have multiple buildbot steps for the same | 98 # It is possible to have multiple buildbot steps for the same |
99 # instrumenation test package using different annotations. | 99 # instrumenation test package using different annotations. |
100 if annotation and len(annotation) == 1: | 100 if annotation and len(annotation) == 1: |
101 suite_name = annotation[0] | 101 suite_name = annotation[0] |
102 else: | 102 else: |
103 suite_name = test_package | 103 suite_name = test_package |
104 _LogToFile(results, test_type, suite_name) | 104 _LogToFile(results, test_type, suite_name) |
105 | 105 |
106 if flakiness_server: | 106 if flakiness_server: |
107 _LogToFlakinessDashboard(results, test_type, test_package, | 107 _LogToFlakinessDashboard(results, test_type, test_package, |
108 flakiness_server) | 108 flakiness_server) |
OLD | NEW |