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 26 matching lines...) Expand all Loading... |
37 flakiness_server): | 37 flakiness_server): |
38 """Upload results to the flakiness dashboard""" | 38 """Upload results to the flakiness dashboard""" |
39 logging.info('Upload results for test type "%s", test package "%s" to %s' % | 39 logging.info('Upload results for test type "%s", test package "%s" to %s' % |
40 (test_type, test_package, flakiness_server)) | 40 (test_type, test_package, flakiness_server)) |
41 | 41 |
42 try: | 42 try: |
43 if test_type == 'Instrumentation': | 43 if test_type == 'Instrumentation': |
44 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER: | 44 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER: |
45 assert test_package in ['ContentShellTest', | 45 assert test_package in ['ContentShellTest', |
46 'ChromePublicTest', | 46 'ChromePublicTest', |
47 'ChromeShellTest', | |
48 'ChromeSyncShellTest', | 47 'ChromeSyncShellTest', |
49 'AndroidWebViewTest'] | 48 'AndroidWebViewTest'] |
50 dashboard_test_type = ('%s_instrumentation_tests' % | 49 dashboard_test_type = ('%s_instrumentation_tests' % |
51 test_package.lower().rstrip('test')) | 50 test_package.lower().rstrip('test')) |
52 # Downstream server. | 51 # Downstream server. |
53 else: | 52 else: |
54 dashboard_test_type = 'Chromium_Android_Instrumentation' | 53 dashboard_test_type = 'Chromium_Android_Instrumentation' |
55 | 54 |
56 elif test_type == 'Unit test': | 55 elif test_type == 'Unit test': |
57 dashboard_test_type = test_package | 56 dashboard_test_type = test_package |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 # instrumenation test package using different annotations. | 104 # instrumenation test package using different annotations. |
106 if annotation and len(annotation) == 1: | 105 if annotation and len(annotation) == 1: |
107 suite_name = annotation[0] | 106 suite_name = annotation[0] |
108 else: | 107 else: |
109 suite_name = test_package | 108 suite_name = test_package |
110 _LogToFile(results, test_type, suite_name) | 109 _LogToFile(results, test_type, suite_name) |
111 | 110 |
112 if flakiness_server: | 111 if flakiness_server: |
113 _LogToFlakinessDashboard(results, test_type, test_package, | 112 _LogToFlakinessDashboard(results, test_type, test_package, |
114 flakiness_server) | 113 flakiness_server) |
OLD | NEW |