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

Side by Side Diff: Tools/TestResultServer/handlers/buildershandler.py

Issue 309783002: Exclude test types that don't upload from the flakiness dashboard UI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Tools/TestResultServer/static-dashboards/aggregate_results_unittest.js » ('j') | 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 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 11 matching lines...) Expand all
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 import datetime 29 import datetime
30 import json 30 import json
31 import logging 31 import logging
32 import re
32 import sys 33 import sys
33 import traceback 34 import traceback
34 import urllib2 35 import urllib2
35 import webapp2 36 import webapp2
36 37
37 from google.appengine.api import memcache 38 from google.appengine.api import memcache
38 39
39 MASTERS = [ 40 MASTERS = [
40 {'name': 'ChromiumWin', 'url': 'http://build.chromium.org/p/chromium.win', ' groups': ['@ToT Chromium']}, 41 {'name': 'ChromiumWin', 'url': 'http://build.chromium.org/p/chromium.win', ' groups': ['@ToT Chromium']},
41 {'name': 'ChromiumMac', 'url': 'http://build.chromium.org/p/chromium.mac', ' groups': ['@ToT Chromium']}, 42 {'name': 'ChromiumMac', 'url': 'http://build.chromium.org/p/chromium.mac', ' groups': ['@ToT Chromium']},
42 {'name': 'ChromiumLinux', 'url': 'http://build.chromium.org/p/chromium.linux ', 'groups': ['@ToT Chromium']}, 43 {'name': 'ChromiumLinux', 'url': 'http://build.chromium.org/p/chromium.linux ', 'groups': ['@ToT Chromium']},
43 {'name': 'ChromiumChromiumOS', 'url': 'http://build.chromium.org/p/chromium. chromiumos', 'groups': ['@ToT ChromeOS']}, 44 {'name': 'ChromiumChromiumOS', 'url': 'http://build.chromium.org/p/chromium. chromiumos', 'groups': ['@ToT ChromeOS']},
44 {'name': 'ChromiumGPU', 'url': 'http://build.chromium.org/p/chromium.gpu', ' groups': ['@ToT Chromium']}, 45 {'name': 'ChromiumGPU', 'url': 'http://build.chromium.org/p/chromium.gpu', ' groups': ['@ToT Chromium']},
45 {'name': 'ChromiumGPUFYI', 'url': 'http://build.chromium.org/p/chromium.gpu. fyi', 'groups': ['@ToT Chromium FYI']}, 46 {'name': 'ChromiumGPUFYI', 'url': 'http://build.chromium.org/p/chromium.gpu. fyi', 'groups': ['@ToT Chromium FYI']},
46 {'name': 'ChromiumWebkit', 'url': 'http://build.chromium.org/p/chromium.webk it', 'groups': ['@ToT Chromium', '@ToT Blink']}, 47 {'name': 'ChromiumWebkit', 'url': 'http://build.chromium.org/p/chromium.webk it', 'groups': ['@ToT Chromium', '@ToT Blink']},
47 {'name': 'ChromiumFYI', 'url': 'http://build.chromium.org/p/chromium.fyi', ' groups': ['@ToT Chromium FYI']}, 48 {'name': 'ChromiumFYI', 'url': 'http://build.chromium.org/p/chromium.fyi', ' groups': ['@ToT Chromium FYI']},
48 {'name': 'V8', 'url': 'http://build.chromium.org/p/client.v8', 'groups': ['@ ToT V8']}, 49 {'name': 'V8', 'url': 'http://build.chromium.org/p/client.v8', 'groups': ['@ ToT V8']},
49 ] 50 ]
50 51
52 # Buildbot steps that have test in the name, but don't run tests.
53 NON_TEST_STEP_NAMES = [
54 'archive',
55 'Run tests',
56 'find isolated tests',
57 'read test spec',
58 'Download latest chromedriver',
59 'compile tests',
60 'create_coverage_',
61 'update test result log',
62 'memory test:',
63 'install_',
64 ]
65
66 # Buildbot steps that run tests but don't upload results to the flakiness dashbo ard server.
67 # FIXME: These should be fixed to upload and then removed from this list.
68 TEST_STEPS_THAT_DO_NOT_UPLOAD_YET = [
69 'java_tests(chrome',
70 'python_tests(chrome',
71 'run_all_tests.py',
72 'test_report',
73 'test CronetSample',
74 'test_mini_installer',
75 'telemetry_unittests',
76 'webkit_python_tests',
77 'webkit_unit_tests',
78 ]
51 79
52 class FetchBuildersException(Exception): pass 80 class FetchBuildersException(Exception): pass
53 81
54 82
55 def master_json_url(master_url): 83 def master_json_url(master_url):
56 return master_url + '/json/builders' 84 return master_url + '/json/builders'
57 85
58 86
59 def builder_json_url(master_url, builder): 87 def builder_json_url(master_url, builder):
60 return master_json_url(master_url) + '/' + urllib2.quote(builder) 88 return master_json_url(master_url) + '/' + urllib2.quote(builder)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 latest_build = get_latest_build(build_data) 163 latest_build = get_latest_build(build_data)
136 if not latest_build: 164 if not latest_build:
137 logging.info('Skipping builder %s because it lacked cached or cu rrent builds.', builder) 165 logging.info('Skipping builder %s because it lacked cached or cu rrent builds.', builder)
138 continue 166 continue
139 167
140 build = fetch_json(cached_build_json_url(master_url, builder, latest _build)) 168 build = fetch_json(cached_build_json_url(master_url, builder, latest _build))
141 if not build: 169 if not build:
142 logging.info('Skipping build %s on builder %s due to empty data' , latest_build, builder) 170 logging.info('Skipping build %s on builder %s due to empty data' , latest_build, builder)
143 for step in build['steps']: 171 for step in build['steps']:
144 step_name = step['name'] 172 step_name = step['name']
145 is_test_step = 'test' in step_name and 'archive' not in step_nam e and 'Run tests' not in step_name 173
174 is_test_step = 'test' in step_name
175 for name in NON_TEST_STEP_NAMES:
Dirk Pranke 2014/06/09 19:06:12 to replace lines 174-183: if not 'test' in step_n
ojan 2014/06/09 21:39:16 Indeed! Also, I realized I forgot to run the unitt
176 if name in step_name:
177 is_test_step = False
178 break
179
180 # Hackity hack. But there's not a better way to exclude certain test steps without
181 # explicitly listing them all. Maybe that would be better?
182 if is_test_step and re.search('/_only|_ignore|_perf$/', step_nam e):
183 is_test_step = False
184
146 if not is_test_step: 185 if not is_test_step:
147 continue 186 continue
148 187
149 if step_name == 'webkit_tests': 188 if step_name == 'webkit_tests':
150 step_name = 'layout-tests' 189 step_name = 'layout-tests'
151 190
152 tests_object.setdefault(step_name, {'builders': []}) 191 tests_object.setdefault(step_name, {'builders': []})
153 tests_object[step_name]['builders'].append(builder) 192 tests_object[step_name]['builders'].append(builder)
154 193
155 for builders in tests_object.values(): 194 for builders in tests_object.values():
156 builders['builders'].sort() 195 builders['builders'].sort()
157 196
158 output_data = {'masters': master_data} 197 output_data = {'masters': master_data, 'no_upload_test_types': TEST_STEPS_TH AT_DO_NOT_UPLOAD_YET}
159 198
160 delta = datetime.datetime.now() - start_time 199 delta = datetime.datetime.now() - start_time
161 200
162 logging.info('Fetched buildbot data in %s seconds.', delta.seconds) 201 logging.info('Fetched buildbot data in %s seconds.', delta.seconds)
163 202
164 return dump_json(output_data) 203 return dump_json(output_data)
165 204
166 205
167 class UpdateBuilders(webapp2.RequestHandler): 206 class UpdateBuilders(webapp2.RequestHandler):
168 """Fetch and update the cached buildbot data.""" 207 """Fetch and update the cached buildbot data."""
(...skipping 25 matching lines...) Expand all
194 buildbot_data = fetch_buildbot_data(MASTERS, True) 233 buildbot_data = fetch_buildbot_data(MASTERS, True)
195 try: 234 try:
196 memcache.set('buildbot_data', buildbot_data) 235 memcache.set('buildbot_data', buildbot_data)
197 except ValueError, err: 236 except ValueError, err:
198 logging.error(str(err)) 237 logging.error(str(err))
199 238
200 if callback: 239 if callback:
201 buildbot_data = callback + '(' + buildbot_data + ');' 240 buildbot_data = callback + '(' + buildbot_data + ');'
202 241
203 self.response.out.write(buildbot_data) 242 self.response.out.write(buildbot_data)
OLDNEW
« no previous file with comments | « no previous file | Tools/TestResultServer/static-dashboards/aggregate_results_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698