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

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

Issue 419883002: TestResultsServer: special handling for aggregate file requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 5 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 | Tools/TestResultServer/model/jsonresults.py » ('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) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 callback_name = self.request.get(PARAM_CALLBACK) 196 callback_name = self.request.get(PARAM_CALLBACK)
197 197
198 logging.debug( 198 logging.debug(
199 "Getting files, master %s, builder: %s, test_type: %s, build_number: %s, name: %s, before: %s.", 199 "Getting files, master %s, builder: %s, test_type: %s, build_number: %s, name: %s, before: %s.",
200 master, builder, test_type, build_number, name, before) 200 master, builder, test_type, build_number, name, before)
201 201
202 if key: 202 if key:
203 json, date = self._get_file_content_from_key(key) 203 json, date = self._get_file_content_from_key(key)
204 elif test_list_json: 204 elif test_list_json:
205 json, date = self._get_test_list_json(master, builder, test_type, bu ild_number) 205 json, date = self._get_test_list_json(master, builder, test_type, bu ild_number)
206 elif num_files or not master or not builder or not test_type or not buil d_number or not name: 206 elif num_files or not master or not builder or not test_type or (not bui ld_number and not JsonResults.is_aggregate_file(name)) or not name:
207 limit = int(num_files) if num_files else 100 207 limit = int(num_files) if num_files else 100
208 self._get_file_list(master, builder, test_type, build_number, name, before, limit, callback_name) 208 self._get_file_list(master, builder, test_type, build_number, name, before, limit, callback_name)
209 return 209 return
210 else: 210 else:
211 json, date = self._get_file_content(master, builder, test_type, buil d_number, name) 211 json, date = self._get_file_content(master, builder, test_type, buil d_number, name)
212 212
213 if json: 213 if json:
214 json = _replace_jsonp_callback(json, callback_name) 214 json = _replace_jsonp_callback(json, callback_name)
215 215
216 self._serve_json(json, date) 216 self._serve_json(json, date)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 class UploadForm(webapp2.RequestHandler): 293 class UploadForm(webapp2.RequestHandler):
294 """Show a form so user can upload a file.""" 294 """Show a form so user can upload a file."""
295 295
296 def get(self): 296 def get(self):
297 template_values = { 297 template_values = {
298 "upload_url": "/testfile/upload", 298 "upload_url": "/testfile/upload",
299 } 299 }
300 self.response.out.write(template.render("templates/uploadform.html", 300 self.response.out.write(template.render("templates/uploadform.html",
301 template_values)) 301 template_values))
OLDNEW
« no previous file with comments | « no previous file | Tools/TestResultServer/model/jsonresults.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698