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

Unified Diff: tools/rebaseline.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: add_CreateGmActualURL 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 side-by-side diff with in-line comments
Download patch
Index: tools/rebaseline.py
===================================================================
--- tools/rebaseline.py (revision 10108)
+++ tools/rebaseline.py (working copy)
@@ -101,7 +101,7 @@
self._actuals_base_url = actuals_base_url
self._actuals_filename = actuals_filename
self._add_new = add_new
- self._testname_pattern = re.compile('(\S+)_(\S+).png')
+ self._image_filename_re = re.compile(gm_json.IMAGE_FILENAME_PATTERN)
# Returns the full contents of filepath, as a single string.
# If filepath looks like a URL, try to read it that way instead of as
@@ -185,7 +185,7 @@
skipped_images = []
if results_to_update:
for (image_name, image_results) in results_to_update.iteritems():
- (test, config) = self._testname_pattern.match(image_name).groups()
+ (test, config) = self._image_filename_re.match(image_name).groups()
borenet 2013/07/16 18:31:03 nit: 80 chars Also, why are we using four space i
epoger 2013/07/16 18:42:32 Thanks to Python's whitespace-sensitivity, I could
borenet 2013/07/16 18:48:37 It's ugly, but what about: (test, config) = \
if self._tests:
if test not in self._tests:
skipped_images.append(image_name)
« no previous file with comments | « tools/jsondiff.py ('k') | tools/rebaseline_imagefiles.py » ('j') | tools/svndiff.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698