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

Unified Diff: tools/rebaseline_imagefiles.py

Issue 18092004: rebaseline.py: add --keep-going-on-failure option, off by default (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: linewrap 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 | « tools/rebaseline.py ('k') | tools/tests/rebaseline/output/exercise-bug1403/output-expected/stdout » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/rebaseline_imagefiles.py
===================================================================
--- tools/rebaseline_imagefiles.py (revision 10108)
+++ tools/rebaseline_imagefiles.py (working copy)
@@ -53,6 +53,7 @@
# json_base_url: base URL from which to read json_filename
# json_filename: filename (under json_base_url) from which to read a
# summary of results; typically "actual-results.json"
+ # exception_handler: reference to rebaseline.ExceptionHandler object
# tests: list of tests to rebaseline, or None if we should rebaseline
# whatever files the JSON results summary file tells us to
# configs: which configs to run for each test, or None if we should
@@ -65,13 +66,14 @@
# missing_json_is_fatal: whether to halt execution if we cannot read a
# JSON actual result summary file
def __init__(self, expectations_root, json_base_url, json_filename,
- tests=None, configs=None, dry_run=False,
+ exception_handler, tests=None, configs=None, dry_run=False,
add_new=False, missing_json_is_fatal=False):
self._expectations_root = expectations_root
self._tests = tests
self._configs = configs
self._json_base_url = json_base_url
self._json_filename = json_filename
+ self._exception_handler = exception_handler
self._dry_run = dry_run
self._add_new = add_new
self._missing_json_is_fatal = missing_json_is_fatal
@@ -254,10 +256,11 @@
# builder : e.g. 'Test-Win7-ShuttleA-HD2000-x86-Release'
def RebaselineSubdir(self, subdir, builder):
if not os.path.isdir(os.path.join(self._expectations_root, subdir)):
- raise Exception((
+ self._exception_handler.RaiseExceptionOrContinue(Exception((
'Could not find "%s" subdir within expectations_root "%s". ' +
'Are you sure --expectations-root is pointing at a valid ' +
- 'gm-expected directory?') % (subdir, self._expectations_root))
+ 'gm-expected directory?') % (subdir, self._expectations_root)))
+ return
json_url = '/'.join([self._json_base_url,
subdir, builder, subdir,
@@ -278,15 +281,11 @@
continue
outfilename = os.path.join(self._expectations_root, subdir,
filename);
- # TODO(epoger): Until we resolve
- # https://code.google.com/p/skia/issues/detail?id=1410 ('some GM
- # result images not available for download from Google Storage'),
- # keep going in the face of missing results for any one test.
try:
self._RebaselineOneFile(expectations_subdir=subdir,
builder_name=builder,
infilename=filename,
outfilename=outfilename,
all_results=all_results)
- except Exception as e:
- print 'WARNING: swallowing exception %s' % e
+ except BaseException as e:
+ self._exception_handler.RaiseExceptionOrContinue(e)
« no previous file with comments | « tools/rebaseline.py ('k') | tools/tests/rebaseline/output/exercise-bug1403/output-expected/stdout » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698