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

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: address review comments. update test 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
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
146 if not is_test_step: 174 if not 'test' in step_name:
175 continue
176
177 if any(name in step_name for name in NON_TEST_STEP_NAMES):
178 continue
179
180 if re.search('_only|_ignore|_perf$', step_name):
147 continue 181 continue
148 182
149 if step_name == 'webkit_tests': 183 if step_name == 'webkit_tests':
150 step_name = 'layout-tests' 184 step_name = 'layout-tests'
151 185
152 tests_object.setdefault(step_name, {'builders': []}) 186 tests_object.setdefault(step_name, {'builders': []})
153 tests_object[step_name]['builders'].append(builder) 187 tests_object[step_name]['builders'].append(builder)
154 188
155 for builders in tests_object.values(): 189 for builders in tests_object.values():
156 builders['builders'].sort() 190 builders['builders'].sort()
157 191
158 output_data = {'masters': master_data} 192 output_data = {'masters': master_data, 'no_upload_test_types': TEST_STEPS_TH AT_DO_NOT_UPLOAD_YET}
159 193
160 delta = datetime.datetime.now() - start_time 194 delta = datetime.datetime.now() - start_time
161 195
162 logging.info('Fetched buildbot data in %s seconds.', delta.seconds) 196 logging.info('Fetched buildbot data in %s seconds.', delta.seconds)
163 197
164 return dump_json(output_data) 198 return dump_json(output_data)
165 199
166 200
167 class UpdateBuilders(webapp2.RequestHandler): 201 class UpdateBuilders(webapp2.RequestHandler):
168 """Fetch and update the cached buildbot data.""" 202 """Fetch and update the cached buildbot data."""
(...skipping 25 matching lines...) Expand all
194 buildbot_data = fetch_buildbot_data(MASTERS, True) 228 buildbot_data = fetch_buildbot_data(MASTERS, True)
195 try: 229 try:
196 memcache.set('buildbot_data', buildbot_data) 230 memcache.set('buildbot_data', buildbot_data)
197 except ValueError, err: 231 except ValueError, err:
198 logging.error(str(err)) 232 logging.error(str(err))
199 233
200 if callback: 234 if callback:
201 buildbot_data = callback + '(' + buildbot_data + ');' 235 buildbot_data = callback + '(' + buildbot_data + ');'
202 236
203 self.response.out.write(buildbot_data) 237 self.response.out.write(buildbot_data)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698