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

Side by Side Diff: gm/gm_json.py

Issue 466153006: add --descriptions flag to render_pictures tool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/image_expectations.h » ('j') | tools/render_pictures_main.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Schema of the JSON summary file written out by the GM tool. 6 """Schema of the JSON summary file written out by the GM tool.
7 7
8 This must be kept in sync with the kJsonKey_ constants in gm_expectations.cpp ! 8 This must be kept in sync with the kJsonKey_ constants in gm_expectations.cpp !
9 """ 9 """
10 10
(...skipping 30 matching lines...) Expand all
41 # we haven't had a chance to check in expectations for yet, or we may have 41 # we haven't had a chance to check in expectations for yet, or we may have
42 # consciously decided to leave them without expectations because we are unhappy 42 # consciously decided to leave them without expectations because we are unhappy
43 # with the results (although we should try to move away from that, and instead 43 # with the results (although we should try to move away from that, and instead
44 # check in expectations with the IGNOREFAILURE flag set). 44 # check in expectations with the IGNOREFAILURE flag set).
45 JSONKEY_ACTUALRESULTS_NOCOMPARISON = 'no-comparison' 45 JSONKEY_ACTUALRESULTS_NOCOMPARISON = 'no-comparison'
46 46
47 # Tests whose results matched their expectations. 47 # Tests whose results matched their expectations.
48 JSONKEY_ACTUALRESULTS_SUCCEEDED = 'succeeded' 48 JSONKEY_ACTUALRESULTS_SUCCEEDED = 'succeeded'
49 49
50 50
51 # Descriptions of the result set as a whole.
52 JSONKEY_DESCRIPTIONS = 'descriptions'
53
54
51 JSONKEY_EXPECTEDRESULTS = 'expected-results' 55 JSONKEY_EXPECTEDRESULTS = 'expected-results'
52 56
53 # One or more [HashType/DigestValue] pairs representing valid results for this 57 # One or more [HashType/DigestValue] pairs representing valid results for this
54 # test. Typically, there will just be one pair, but we allow for multiple 58 # test. Typically, there will just be one pair, but we allow for multiple
55 # expectations, and the test will pass if any one of them is matched. 59 # expectations, and the test will pass if any one of them is matched.
56 JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS = 'allowed-digests' 60 JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS = 'allowed-digests'
57 61
58 # Optional: one or more integers listing Skia bugs (under 62 # Optional: one or more integers listing Skia bugs (under
59 # https://code.google.com/p/skia/issues/list ) that pertain to this expectation. 63 # https://code.google.com/p/skia/issues/list ) that pertain to this expectation.
60 JSONKEY_EXPECTEDRESULTS_BUGS = 'bugs' 64 JSONKEY_EXPECTEDRESULTS_BUGS = 'bugs'
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 185
182 186
183 def WriteToFile(json_dict, file_path): 187 def WriteToFile(json_dict, file_path):
184 """Writes the JSON summary in json_dict out to file_path. 188 """Writes the JSON summary in json_dict out to file_path.
185 189
186 The file is written Unix-style (each line ends with just LF, not CRLF); 190 The file is written Unix-style (each line ends with just LF, not CRLF);
187 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons.""" 191 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons."""
188 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile: 192 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile:
189 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True, 193 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True,
190 indent=2))) 194 indent=2)))
OLDNEW
« no previous file with comments | « no previous file | tools/image_expectations.h » ('j') | tools/render_pictures_main.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698