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

Side by Side Diff: dashboard/dashboard/list_tests.py

Issue 2588203002: Added in a revision picker with dummy data (Closed)
Patch Set: figuring out what is on this branch Created 3 years, 11 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 | « dashboard/dashboard/elements/test-picker.html ('k') | dashboard/dashboard/speed_releasing.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 """Functions for making lists of tests, and an AJAX endpoint to list tests. 5 """Functions for making lists of tests, and an AJAX endpoint to list tests.
6 6
7 This module contains functions for listing: 7 This module contains functions for listing:
8 - Sub-tests for a given test suite (in a tree structure). 8 - Sub-tests for a given test suite (in a tree structure).
9 - Tests which match a given test path pattern. 9 - Tests which match a given test path pattern.
10 """ 10 """
(...skipping 19 matching lines...) Expand all
30 suite: Test suite name (applies only if type is "sub_tests"). 30 suite: Test suite name (applies only if type is "sub_tests").
31 bots: Comma-separated bots name (applies only if type is "sub_tests"). 31 bots: Comma-separated bots name (applies only if type is "sub_tests").
32 p: Test path pattern (applies only if type is "pattern"). 32 p: Test path pattern (applies only if type is "pattern").
33 has_rows: "1" if the requester wants to list only list tests that 33 has_rows: "1" if the requester wants to list only list tests that
34 have points (applies only if type is "pattern"). 34 have points (applies only if type is "pattern").
35 35
36 Outputs: 36 Outputs:
37 A data structure with test names in JSON format, or nothing. 37 A data structure with test names in JSON format, or nothing.
38 """ 38 """
39 self.response.headers.add_header('Access-Control-Allow-Origin', '*') 39 self.response.headers.add_header('Access-Control-Allow-Origin', '*')
40
41 speed_releasing = self.request.get('speed_releasing')
42 if speed_releasing == 'true':
43 tests = {}
44 tests['memory:chrome:all_processes:reported_by_chrome:gpu:effective_size_a vg'] = {}
45 tests['memory:chrome:all_processes:reported_by_chrome:gpu:effective_size_a vg'] = {'has_rows': True, 'sub_tests': {}}
46
47 self.response.out.write(json.dumps(tests))
48 return
49
40 list_type = self.request.get('type') 50 list_type = self.request.get('type')
41 # TODO(qyearsley): Separate these into two different handlers. 51 # TODO(qyearsley): Separate these into two different handlers.
42 52
43 if list_type == 'sub_tests': 53 if list_type == 'sub_tests':
44 suite_name = self.request.get('suite') 54 suite_name = self.request.get('suite')
45 bot_names = self.request.get('bots').split(',') 55 bot_names = self.request.get('bots').split(',')
46 test_list = GetSubTests(suite_name, bot_names) 56 test_list = GetSubTests(suite_name, bot_names)
47 self.response.out.write(json.dumps(test_list)) 57 self.response.out.write(json.dumps(test_list))
48 58
49 if list_type == 'pattern': 59 if list_type == 'pattern':
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 query_parts.append(('test_part%d_name' % (index + 1), part)) 278 query_parts.append(('test_part%d_name' % (index + 1), part))
269 query = graph_data.TestMetadata.query() 279 query = graph_data.TestMetadata.query()
270 for part in query_parts: 280 for part in query_parts:
271 query = query.filter(ndb.GenericProperty(part[0]) == part[1]) 281 query = query.filter(ndb.GenericProperty(part[0]) == part[1])
272 if has_rows is not None: 282 if has_rows is not None:
273 query = query.filter(graph_data.TestMetadata.has_rows == has_rows) 283 query = query.filter(graph_data.TestMetadata.has_rows == has_rows)
274 if deprecated is not None: 284 if deprecated is not None:
275 query = query.filter(graph_data.TestMetadata.deprecated == deprecated) 285 query = query.filter(graph_data.TestMetadata.deprecated == deprecated)
276 descendants = query.fetch(keys_only=keys_only) 286 descendants = query.fetch(keys_only=keys_only)
277 return descendants 287 return descendants
OLDNEW
« no previous file with comments | « dashboard/dashboard/elements/test-picker.html ('k') | dashboard/dashboard/speed_releasing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698