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

Side by Side Diff: gm/gm_json.py

Issue 479613002: Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix render_pictures_test after rebase 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 | gm/rebaseline_server/compare_configs.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 #!/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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 JSONKEY_HEADER = 'header' 88 JSONKEY_HEADER = 'header'
89 JSONKEY_HEADER_TYPE = 'type' 89 JSONKEY_HEADER_TYPE = 'type'
90 JSONKEY_HEADER_REVISION = 'revision' 90 JSONKEY_HEADER_REVISION = 'revision'
91 JSONKEY_IMAGE_CHECKSUMALGORITHM = 'checksumAlgorithm' 91 JSONKEY_IMAGE_CHECKSUMALGORITHM = 'checksumAlgorithm'
92 JSONKEY_IMAGE_CHECKSUMVALUE = 'checksumValue' 92 JSONKEY_IMAGE_CHECKSUMVALUE = 'checksumValue'
93 JSONKEY_IMAGE_COMPARISONRESULT = 'comparisonResult' 93 JSONKEY_IMAGE_COMPARISONRESULT = 'comparisonResult'
94 JSONKEY_IMAGE_FILEPATH = 'filepath' 94 JSONKEY_IMAGE_FILEPATH = 'filepath'
95 JSONKEY_SOURCE_TILEDIMAGES = 'tiled-images' 95 JSONKEY_SOURCE_TILEDIMAGES = 'tiled-images'
96 JSONKEY_SOURCE_WHOLEIMAGE = 'whole-image' 96 JSONKEY_SOURCE_WHOLEIMAGE = 'whole-image'
97 JSONKEY_IMAGE_BASE_GS_URL = 'image-base-gs-url'
97 98
98 99
99 # Root directory where the buildbots store their actually-generated images... 100 # Root directory where the buildbots store their actually-generated images...
100 # as a publicly readable HTTP URL: 101 # as a publicly readable HTTP URL:
101 GM_ACTUALS_ROOT_HTTP_URL = ( 102 GM_ACTUALS_ROOT_HTTP_URL = (
102 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm') 103 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm')
103 # as a GS URL that allows credential-protected write access: 104 # as a GS URL that allows credential-protected write access:
104 GM_ACTUALS_ROOT_GS_URL = 'gs://chromium-skia-gm/gm' 105 GM_ACTUALS_ROOT_GS_URL = 'gs://chromium-skia-gm/gm'
105 106
106 # Root directory where buildbots store skimage actual results json files. 107 # Root directory where buildbots store skimage actual results json files.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 190
190 191
191 def WriteToFile(json_dict, file_path): 192 def WriteToFile(json_dict, file_path):
192 """Writes the JSON summary in json_dict out to file_path. 193 """Writes the JSON summary in json_dict out to file_path.
193 194
194 The file is written Unix-style (each line ends with just LF, not CRLF); 195 The file is written Unix-style (each line ends with just LF, not CRLF);
195 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons.""" 196 see https://code.google.com/p/skia/issues/detail?id=1815 for reasons."""
196 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile: 197 with io.open(file_path, mode='w', newline='', encoding='utf-8') as outfile:
197 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True, 198 outfile.write(unicode(json.dumps(json_dict, outfile, sort_keys=True,
198 indent=2))) 199 indent=2)))
OLDNEW
« no previous file with comments | « no previous file | gm/rebaseline_server/compare_configs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698