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 25 matching lines...) Expand all Loading... | |
36 results.GetShortForm()) | 36 results.GetShortForm()) |
37 | 37 |
38 | 38 |
39 def _LogToFlakinessDashboard(results, test_type, test_package, | 39 def _LogToFlakinessDashboard(results, test_type, test_package, |
40 flakiness_server): | 40 flakiness_server): |
41 """Upload results to the flakiness dashboard""" | 41 """Upload results to the flakiness dashboard""" |
42 logging.info('Upload results for test type "%s", test package "%s" to %s' % | 42 logging.info('Upload results for test type "%s", test package "%s" to %s' % |
43 (test_type, test_package, flakiness_server)) | 43 (test_type, test_package, flakiness_server)) |
44 | 44 |
45 # TODO(frankf): Enable uploading for gtests. | 45 # TODO(frankf): Enable uploading for gtests. |
46 if test_type != 'Instrumentation': | 46 if test_type not in ['Instrumentation', 'HostDriven']: |
frankf
2013/07/02 20:51:10
This is no longer needed right?
gkanwar
2013/07/02 21:16:14
Ah good catch. Fixed.
| |
47 logging.warning('Invalid test type.') | 47 logging.warning('Invalid test type.') |
48 return | 48 return |
49 | 49 |
50 try: | 50 try: |
51 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER: | 51 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER: |
52 assert test_package in ['ContentShellTest', | 52 assert test_package in ['ContentShellTest', |
53 'ChromiumTestShellTest', | 53 'ChromiumTestShellTest', |
54 'AndroidWebViewTest'] | 54 'AndroidWebViewTest'] |
55 dashboard_test_type = ('%s_instrumentation_tests' % | 55 dashboard_test_type = ('%s_instrumentation_tests' % |
56 test_package.lower().rstrip('test')) | 56 test_package.lower().rstrip('test')) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 _LogToFlakinessDashboard(results, test_type, test_package, | 111 _LogToFlakinessDashboard(results, test_type, test_package, |
112 flakiness_server) | 112 flakiness_server) |
113 | 113 |
114 | 114 |
115 def PrintAnnotation(results): | 115 def PrintAnnotation(results): |
116 """Print buildbot annotations for test results.""" | 116 """Print buildbot annotations for test results.""" |
117 if not results.DidRunPass(): | 117 if not results.DidRunPass(): |
118 buildbot_report.PrintError() | 118 buildbot_report.PrintError() |
119 else: | 119 else: |
120 print 'Step success!' # No annotation needed | 120 print 'Step success!' # No annotation needed |
OLD | NEW |