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

Unified Diff: tools/rebaseline.py

Issue 19415002: rebaseline.py: fix --add-new for JSON files (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/rebaseline.py
===================================================================
--- tools/rebaseline.py (revision 10116)
+++ tools/rebaseline.py (working copy)
@@ -226,6 +226,7 @@
expectations_json_filepath = os.path.join(
self._expectations_root, subdir, self._expectations_filename)
expectations_dict = gm_json.LoadFromFile(expectations_json_filepath)
+ expected_results = expectations_dict[gm_json.JSONKEY_EXPECTEDRESULTS]
# Update the expectations in memory, skipping any tests/configs that
# the caller asked to exclude.
@@ -242,9 +243,9 @@
if config not in self._configs:
skipped_images.append(image_name)
continue
- expectations_dict \
- [gm_json.JSONKEY_EXPECTEDRESULTS] \
- [image_name] \
+ if not expected_results.get(image_name):
+ expected_results[image_name] = {}
+ expected_results[image_name] \
[gm_json.JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS] = \
[image_results]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698