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

Side by Side Diff: tools/verify_images_for_gm_results.py

Issue 19112002: svndiff.py: add ability to compare before-and-after JSON files, not just raw images (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: sync_to_r10112 Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « tools/svndiff.py ('k') | no next file » | 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 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 7
8 """ Look through skia-autogen, searching for all checksums which should have 8 """ Look through skia-autogen, searching for all checksums which should have
9 corresponding files in Google Storage, and verify that those files exist. """ 9 corresponding files in Google Storage, and verify that those files exist. """
10 10
11 11
12 import json 12 import json
13 import posixpath 13 import posixpath
14 import re 14 import re
15 import subprocess 15 import subprocess
16 import sys 16 import sys
17 17
18 18
19 # TODO(borenet): Replace some/all of these with constants from gm/gm_json.py
19 AUTOGEN_URL = 'http://skia-autogen.googlecode.com/svn/gm-actual' 20 AUTOGEN_URL = 'http://skia-autogen.googlecode.com/svn/gm-actual'
20 GS_URL = 'gs://chromium-skia-gm/gm' 21 GS_URL = 'gs://chromium-skia-gm/gm'
21 TEST_NAME_PATTERN = re.compile('(\S+)_(\S+).png') 22 TEST_NAME_PATTERN = re.compile('(\S+)_(\S+).png')
22 23
23 24
24 def FileNameToGSURL(filename, hash_type, hash_value): 25 def FileNameToGSURL(filename, hash_type, hash_value):
25 """ Convert a file name given in a checksum file to the URL of the 26 """ Convert a file name given in a checksum file to the URL of the
26 corresponding image file in Google Storage. 27 corresponding image file in Google Storage.
27 28
28 filename: string; the file name to convert. Takes the form specified by 29 filename: string; the file name to convert. Takes the form specified by
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 def Main(): 153 def Main():
153 urls = FindURLs(AUTOGEN_URL) 154 urls = FindURLs(AUTOGEN_URL)
154 missing = VerifyURLs(urls) 155 missing = VerifyURLs(urls)
155 if missing: 156 if missing:
156 print 'Found %d Missing files.' % len(missing) 157 print 'Found %d Missing files.' % len(missing)
157 return 1 158 return 1
158 159
159 160
160 if __name__ == '__main__': 161 if __name__ == '__main__':
161 sys.exit(Main()) 162 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/svndiff.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698