OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 51 # Descriptions of the result set as a whole. |
52 JSONKEY_DESCRIPTIONS = 'descriptions' | 52 JSONKEY_DESCRIPTIONS = 'descriptions' |
53 | 53 JSONKEY_DESCRIPTIONS_BUILDER = 'builder' |
| 54 JSONKEY_DESCRIPTIONS_RENDER_MODE = 'renderMode' |
54 | 55 |
55 JSONKEY_EXPECTEDRESULTS = 'expected-results' | 56 JSONKEY_EXPECTEDRESULTS = 'expected-results' |
56 | 57 |
57 # One or more [HashType/DigestValue] pairs representing valid results for this | 58 # One or more [HashType/DigestValue] pairs representing valid results for this |
58 # test. Typically, there will just be one pair, but we allow for multiple | 59 # test. Typically, there will just be one pair, but we allow for multiple |
59 # expectations, and the test will pass if any one of them is matched. | 60 # expectations, and the test will pass if any one of them is matched. |
60 JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS = 'allowed-digests' | 61 JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS = 'allowed-digests' |
61 | 62 |
62 # Optional: one or more integers listing Skia bugs (under | 63 # Optional: one or more integers listing Skia bugs (under |
63 # https://code.google.com/p/skia/issues/list ) that pertain to this expectation. | 64 # https://code.google.com/p/skia/issues/list ) that pertain to this expectation. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 189 |
189 | 190 |
190 def WriteToFile(json_dict, file_path): | 191 def WriteToFile(json_dict, file_path): |
191 """Writes the JSON summary in json_dict out to file_path. | 192 """Writes the JSON summary in json_dict out to file_path. |
192 | 193 |
193 The file is written Unix-style (each line ends with just LF, not CRLF); | 194 The file is written Unix-style (each line ends with just LF, not CRLF); |
194 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons.""" | 195 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons.""" |
195 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile: | 196 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile: |
196 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True, | 197 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True, |
197 indent=2))) | 198 indent=2))) |
OLD | NEW |