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

Side by Side Diff: gm/rebaseline_server/results.py

Issue 270413002: rebaseline_server JSON: pass category values as values, not keys (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 7 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 | « gm/rebaseline_server/imagepairset_test.py ('k') | gm/rebaseline_server/static/constants.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 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2013 Google Inc. 4 Copyright 2013 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Repackage expected/actual GM results as needed by our HTML rebaseline viewer. 9 Repackage expected/actual GM results as needed by our HTML rebaseline viewer.
10 """ 10 """
(...skipping 13 matching lines...) Expand all
24 # so any dirs that are already in the PYTHONPATH will be preferred. 24 # so any dirs that are already in the PYTHONPATH will be preferred.
25 PARENT_DIRECTORY = os.path.dirname(os.path.realpath(__file__)) 25 PARENT_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
26 GM_DIRECTORY = os.path.dirname(PARENT_DIRECTORY) 26 GM_DIRECTORY = os.path.dirname(PARENT_DIRECTORY)
27 if GM_DIRECTORY not in sys.path: 27 if GM_DIRECTORY not in sys.path:
28 sys.path.append(GM_DIRECTORY) 28 sys.path.append(GM_DIRECTORY)
29 import gm_json 29 import gm_json
30 import imagepairset 30 import imagepairset
31 31
32 # Keys used to link an image to a particular GM test. 32 # Keys used to link an image to a particular GM test.
33 # NOTE: Keep these in sync with static/constants.js 33 # NOTE: Keep these in sync with static/constants.js
34 REBASELINE_SERVER_SCHEMA_VERSION_NUMBER = 2 34 REBASELINE_SERVER_SCHEMA_VERSION_NUMBER = 3
35 KEY__EXPECTATIONS__BUGS = gm_json.JSONKEY_EXPECTEDRESULTS_BUGS 35 KEY__EXPECTATIONS__BUGS = gm_json.JSONKEY_EXPECTEDRESULTS_BUGS
36 KEY__EXPECTATIONS__IGNOREFAILURE = gm_json.JSONKEY_EXPECTEDRESULTS_IGNOREFAILURE 36 KEY__EXPECTATIONS__IGNOREFAILURE = gm_json.JSONKEY_EXPECTEDRESULTS_IGNOREFAILURE
37 KEY__EXPECTATIONS__REVIEWED = gm_json.JSONKEY_EXPECTEDRESULTS_REVIEWED 37 KEY__EXPECTATIONS__REVIEWED = gm_json.JSONKEY_EXPECTEDRESULTS_REVIEWED
38 KEY__EXTRACOLUMN__BUILDER = 'builder' 38 KEY__EXTRACOLUMN__BUILDER = 'builder'
39 KEY__EXTRACOLUMN__CONFIG = 'config' 39 KEY__EXTRACOLUMN__CONFIG = 'config'
40 KEY__EXTRACOLUMN__RESULT_TYPE = 'resultType' 40 KEY__EXTRACOLUMN__RESULT_TYPE = 'resultType'
41 KEY__EXTRACOLUMN__TEST = 'test' 41 KEY__EXTRACOLUMN__TEST = 'test'
42 KEY__HEADER = 'header' 42 KEY__HEADER = 'header'
43 KEY__HEADER__DATAHASH = 'dataHash' 43 KEY__HEADER__DATAHASH = 'dataHash'
44 KEY__HEADER__IS_EDITABLE = 'isEditable' 44 KEY__HEADER__IS_EDITABLE = 'isEditable'
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 @staticmethod 298 @staticmethod
299 def get_multilevel(input_dict, *keys): 299 def get_multilevel(input_dict, *keys):
300 """ Returns input_dict[key1][key2][...], or None if any key is not found. 300 """ Returns input_dict[key1][key2][...], or None if any key is not found.
301 """ 301 """
302 for key in keys: 302 for key in keys:
303 if input_dict == None: 303 if input_dict == None:
304 return None 304 return None
305 input_dict = input_dict.get(key, None) 305 input_dict = input_dict.get(key, None)
306 return input_dict 306 return input_dict
OLDNEW
« no previous file with comments | « gm/rebaseline_server/imagepairset_test.py ('k') | gm/rebaseline_server/static/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698