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

Unified Diff: tools/rebaseline.py

Issue 16782003: rebaseline.py: if rebaselining all platforms (not listing them explicitly), allow missing platforms (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 9505)
+++ tools/rebaseline.py (working copy)
@@ -88,8 +88,10 @@
self._configs = configs
if not subdirs:
self._subdirs = sorted(SUBDIR_MAPPING.keys())
+ self._missing_json_is_fatal = False
else:
self._subdirs = subdirs
+ self._missing_json_is_fatal = True
epoger 2013/06/11 16:15:33 After this change, you still get an exception if t
self._json_base_url = json_base_url
self._json_filename = json_filename
self._dry_run = dry_run
@@ -144,6 +146,12 @@
# rather than a list of TESTS, like this:
# ['imageblur', 'xfermodes']
#
+ # If the JSON actual result summary file cannot be loaded, the behavior
+ # depends on self._missing_json_is_fatal:
+ # - if true: execution will halt with an exception
+ # - if false: we will log an error message but return an empty list so we
+ # go on to the next platform
+ #
# params:
# json_url: URL pointing to a JSON actual result summary file
#
@@ -153,7 +161,16 @@
def _GetFilesToRebaseline(self, json_url):
print ('# Getting files to rebaseline from JSON summary URL %s ...'
% json_url)
- json_contents = self._GetContentsOfUrl(json_url)
+ try:
+ json_contents = self._GetContentsOfUrl(json_url)
+ except urllib2.HTTPError:
+ message = 'unable to load JSON summary URL %s' % json_url
+ if self._missing_json_is_fatal:
+ raise ValueError(message)
+ else:
+ print '# %s' % message
+ return []
+
json_dict = gm_json.LoadFromString(json_contents)
actual_results = json_dict[gm_json.JSONKEY_ACTUALRESULTS]
« 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