Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: build/android/pylib/results/report_results.py

Issue 1389413002: [Android] Fix flakiness dashbaord reporting for gtests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 results.GetShortForm()) 33 results.GetShortForm())
34 34
35 35
36 def _LogToFlakinessDashboard(results, test_type, test_package, 36 def _LogToFlakinessDashboard(results, test_type, test_package,
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 # TODO(jbudorick): remove Instrumentation once instrumentation tests
44 # switch to platform mode.
45 if test_type in ('instrumentation', 'Instrumentation'):
44 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER: 46 if flakiness_server == constants.UPSTREAM_FLAKINESS_SERVER:
45 assert test_package in ['ContentShellTest', 47 assert test_package in ['ContentShellTest',
46 'ChromePublicTest', 48 'ChromePublicTest',
47 'ChromeSyncShellTest', 49 'ChromeSyncShellTest',
48 'AndroidWebViewTest'] 50 'AndroidWebViewTest']
49 dashboard_test_type = ('%s_instrumentation_tests' % 51 dashboard_test_type = ('%s_instrumentation_tests' %
50 test_package.lower().rstrip('test')) 52 test_package.lower().rstrip('test'))
51 # Downstream server. 53 # Downstream server.
52 else: 54 else:
53 dashboard_test_type = 'Chromium_Android_Instrumentation' 55 dashboard_test_type = 'Chromium_Android_Instrumentation'
54 56
55 elif test_type == 'Unit test': 57 elif test_type == 'gtest':
56 dashboard_test_type = test_package 58 dashboard_test_type = test_package
57 59
58 else: 60 else:
59 logging.warning('Invalid test type') 61 logging.warning('Invalid test type')
60 return 62 return
61 63
62 results_uploader.Upload( 64 results_uploader.Upload(
63 results, flakiness_server, dashboard_test_type) 65 results, flakiness_server, dashboard_test_type)
64 66
65 except Exception: # pylint: disable=broad-except 67 except Exception: # pylint: disable=broad-except
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 # instrumenation test package using different annotations. 106 # instrumenation test package using different annotations.
105 if annotation and len(annotation) == 1: 107 if annotation and len(annotation) == 1:
106 suite_name = annotation[0] 108 suite_name = annotation[0]
107 else: 109 else:
108 suite_name = test_package 110 suite_name = test_package
109 _LogToFile(results, test_type, suite_name) 111 _LogToFile(results, test_type, suite_name)
110 112
111 if flakiness_server: 113 if flakiness_server:
112 _LogToFlakinessDashboard(results, test_type, test_package, 114 _LogToFlakinessDashboard(results, test_type, test_package,
113 flakiness_server) 115 flakiness_server)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698