blob: bf0e1cb1b30fd6cf790aad2c96ed366547f369b4 [file] [log] [blame]
senorblanco@chromium.org782f3b42012-10-29 18:06:26 +00001#!/usr/bin/python
2
3'''
4Copyright 2012 Google Inc.
5
6Use of this source code is governed by a BSD-style license that can be
7found in the LICENSE file.
8'''
9
10'''
senorblanco@chromium.org123a0b52012-11-29 21:50:34 +000011Rebaselines the given GM tests, on all bots and all configurations.
epoger@google.com61822a22013-07-16 18:56:32 +000012
13TODO(epoger): Fix indentation in this file (2-space indents, not 4-space).
senorblanco@chromium.org782f3b42012-10-29 18:06:26 +000014'''
15
epoger@google.com99ba65a2013-06-05 15:43:37 +000016# System-level imports
epoger@google.com9166bf52013-05-30 15:46:19 +000017import argparse
epoger@google.comec3397b2013-05-29 17:09:43 +000018import os
epoger@google.come78d2072013-06-12 17:44:14 +000019import re
epoger@google.com27e1c002013-07-24 15:38:39 +000020import subprocess
epoger@google.comec3397b2013-05-29 17:09:43 +000021import sys
epoger@google.com99ba65a2013-06-05 15:43:37 +000022import urllib2
23
epoger@google.com99a8ec92013-06-19 18:56:59 +000024# Imports from local directory
25import rebaseline_imagefiles
26
epoger@google.com99ba65a2013-06-05 15:43:37 +000027# Imports from within Skia
28#
epoger@google.comdad53102013-06-12 14:25:30 +000029# We need to add the 'gm' directory, so that we can import gm_json.py within
30# that directory. That script allows us to parse the actual-results.json file
31# written out by the GM tool.
32# Make sure that the 'gm' dir is in the PYTHONPATH, but add it at the *end*
33# so any dirs that are already in the PYTHONPATH will be preferred.
34#
35# This assumes that the 'gm' directory has been checked out as a sibling of
36# the 'tools' directory containing this script, which will be the case if
37# 'trunk' was checked out as a single unit.
epoger@google.com99ba65a2013-06-05 15:43:37 +000038GM_DIRECTORY = os.path.realpath(
39 os.path.join(os.path.dirname(os.path.dirname(__file__)), 'gm'))
40if GM_DIRECTORY not in sys.path:
41 sys.path.append(GM_DIRECTORY)
42import gm_json
43
epoger@google.come94a7d22013-07-23 19:37:03 +000044# Mapping of expectations/gm subdir (under
45# https://skia.googlecode.com/svn/trunk/expectations/gm/ )
epoger@google.comec3397b2013-05-29 17:09:43 +000046# to builder name (see list at http://108.170.217.252:10117/builders )
epoger@google.com9166bf52013-05-30 15:46:19 +000047SUBDIR_MAPPING = {
epoger@google.comec3397b2013-05-29 17:09:43 +000048 'base-shuttle-win7-intel-float':
49 'Test-Win7-ShuttleA-HD2000-x86-Release',
50 'base-shuttle-win7-intel-angle':
51 'Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE',
52 'base-shuttle-win7-intel-directwrite':
53 'Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite',
54 'base-shuttle_ubuntu12_ati5770':
55 'Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release',
56 'base-macmini':
57 'Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release',
58 'base-macmini-lion-float':
59 'Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release',
60 'base-android-galaxy-nexus':
61 'Test-Android-GalaxyNexus-SGX540-Arm7-Debug',
62 'base-android-nexus-7':
63 'Test-Android-Nexus7-Tegra3-Arm7-Release',
64 'base-android-nexus-s':
65 'Test-Android-NexusS-SGX540-Arm7-Release',
66 'base-android-xoom':
67 'Test-Android-Xoom-Tegra2-Arm7-Release',
68 'base-android-nexus-10':
69 'Test-Android-Nexus10-MaliT604-Arm7-Release',
robertphillips@google.com63e96272013-07-02 12:54:37 +000070 'base-android-nexus-4':
71 'Test-Android-Nexus4-Adreno320-Arm7-Release',
epoger@google.comec3397b2013-05-29 17:09:43 +000072}
73
epoger@google.com9166bf52013-05-30 15:46:19 +000074
epoger@google.com66ba9f92013-07-11 19:20:30 +000075class _InternalException(Exception):
epoger@google.comdb29a312013-06-04 14:58:47 +000076 pass
77
epoger@google.comffcbdbf2013-07-16 17:35:39 +000078# Object that handles exceptions, either raising them immediately or collecting
79# them to display later on.
80class ExceptionHandler(object):
81
82 # params:
83 # keep_going_on_failure: if False, report failures and quit right away;
84 # if True, collect failures until
85 # ReportAllFailures() is called
86 def __init__(self, keep_going_on_failure=False):
87 self._keep_going_on_failure = keep_going_on_failure
88 self._failures_encountered = []
89 self._exiting = False
90
91 # Exit the program with the given status value.
92 def _Exit(self, status=1):
93 self._exiting = True
94 sys.exit(status)
95
96 # We have encountered an exception; either collect the info and keep going,
97 # or exit the program right away.
98 def RaiseExceptionOrContinue(self, e):
99 # If we are already quitting the program, propagate any exceptions
100 # so that the proper exit status will be communicated to the shell.
101 if self._exiting:
102 raise e
103
104 if self._keep_going_on_failure:
105 print >> sys.stderr, 'WARNING: swallowing exception %s' % e
106 self._failures_encountered.append(e)
107 else:
108 print >> sys.stderr, e
109 print >> sys.stderr, (
110 'Halting at first exception; to keep going, re-run ' +
111 'with the --keep-going-on-failure option set.')
112 self._Exit()
113
114 def ReportAllFailures(self):
115 if self._failures_encountered:
116 print >> sys.stderr, ('Encountered %d failures (see above).' %
117 len(self._failures_encountered))
118 self._Exit()
119
120
epoger@google.com99a8ec92013-06-19 18:56:59 +0000121# Object that rebaselines a JSON expectations file (not individual image files).
epoger@google.com99a8ec92013-06-19 18:56:59 +0000122class JsonRebaseliner(object):
epoger@google.com9166bf52013-05-30 15:46:19 +0000123
124 # params:
epoger@google.coma783f2b2013-07-08 17:51:58 +0000125 # expectations_root: root directory of all expectations JSON files
epoger@google.comc60e7452013-07-24 19:36:51 +0000126 # expectations_input_filename: filename (under expectations_root) of JSON
127 # expectations file to read; typically
128 # "expected-results.json"
129 # expectations_output_filename: filename (under expectations_root) to
130 # which updated expectations should be
131 # written; typically the same as
132 # expectations_input_filename, to overwrite
133 # the old content
epoger@google.coma783f2b2013-07-08 17:51:58 +0000134 # actuals_base_url: base URL from which to read actual-result JSON files
135 # actuals_filename: filename (under actuals_base_url) from which to read a
136 # summary of results; typically "actual-results.json"
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000137 # exception_handler: reference to rebaseline.ExceptionHandler object
epoger@google.com99ba65a2013-06-05 15:43:37 +0000138 # tests: list of tests to rebaseline, or None if we should rebaseline
139 # whatever files the JSON results summary file tells us to
epoger@google.com9de25e32013-07-10 15:27:18 +0000140 # configs: which configs to run for each test, or None if we should
141 # rebaseline whatever configs the JSON results summary file tells
142 # us to
epoger@google.comdad53102013-06-12 14:25:30 +0000143 # add_new: if True, add expectations for tests which don't have any yet
epoger@google.comc60e7452013-07-24 19:36:51 +0000144 def __init__(self, expectations_root, expectations_input_filename,
145 expectations_output_filename, actuals_base_url,
146 actuals_filename, exception_handler,
epoger@google.coma783f2b2013-07-08 17:51:58 +0000147 tests=None, configs=None, add_new=False):
epoger@google.com99a8ec92013-06-19 18:56:59 +0000148 self._expectations_root = expectations_root
epoger@google.comc60e7452013-07-24 19:36:51 +0000149 self._expectations_input_filename = expectations_input_filename
150 self._expectations_output_filename = expectations_output_filename
epoger@google.com9166bf52013-05-30 15:46:19 +0000151 self._tests = tests
152 self._configs = configs
epoger@google.coma783f2b2013-07-08 17:51:58 +0000153 self._actuals_base_url = actuals_base_url
154 self._actuals_filename = actuals_filename
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000155 self._exception_handler = exception_handler
epoger@google.comdad53102013-06-12 14:25:30 +0000156 self._add_new = add_new
epoger@google.com61822a22013-07-16 18:56:32 +0000157 self._image_filename_re = re.compile(gm_json.IMAGE_FILENAME_PATTERN)
epoger@google.com27e1c002013-07-24 15:38:39 +0000158 self._using_svn = os.path.isdir(os.path.join(expectations_root, '.svn'))
159
160 # Executes subprocess.call(cmd).
161 # Raises an Exception if the command fails.
162 def _Call(self, cmd):
163 if subprocess.call(cmd) != 0:
164 raise _InternalException('error running command: ' + ' '.join(cmd))
epoger@google.com9166bf52013-05-30 15:46:19 +0000165
epoger@google.coma783f2b2013-07-08 17:51:58 +0000166 # Returns the full contents of filepath, as a single string.
167 # If filepath looks like a URL, try to read it that way instead of as
168 # a path on local storage.
epoger@google.com66ba9f92013-07-11 19:20:30 +0000169 #
170 # Raises _InternalException if there is a problem.
epoger@google.coma783f2b2013-07-08 17:51:58 +0000171 def _GetFileContents(self, filepath):
172 if filepath.startswith('http:') or filepath.startswith('https:'):
epoger@google.com66ba9f92013-07-11 19:20:30 +0000173 try:
174 return urllib2.urlopen(filepath).read()
175 except urllib2.HTTPError as e:
176 raise _InternalException('unable to read URL %s: %s' % (
177 filepath, e))
epoger@google.com99ba65a2013-06-05 15:43:37 +0000178 else:
epoger@google.coma783f2b2013-07-08 17:51:58 +0000179 return open(filepath, 'r').read()
epoger@google.com99ba65a2013-06-05 15:43:37 +0000180
epoger@google.come78d2072013-06-12 17:44:14 +0000181 # Returns a dictionary of actual results from actual-results.json file.
182 #
183 # The dictionary returned has this format:
184 # {
185 # u'imageblur_565.png': [u'bitmap-64bitMD5', 3359963596899141322],
186 # u'imageblur_8888.png': [u'bitmap-64bitMD5', 4217923806027861152],
187 # u'shadertext3_8888.png': [u'bitmap-64bitMD5', 3713708307125704716]
188 # }
189 #
epoger@google.com66ba9f92013-07-11 19:20:30 +0000190 # If the JSON actual result summary file cannot be loaded, logs a warning
191 # message and returns None.
192 # If the JSON actual result summary file can be loaded, but we have
193 # trouble parsing it, raises an Exception.
epoger@google.come78d2072013-06-12 17:44:14 +0000194 #
195 # params:
196 # json_url: URL pointing to a JSON actual result summary file
197 # sections: a list of section names to include in the results, e.g.
198 # [gm_json.JSONKEY_ACTUALRESULTS_FAILED,
199 # gm_json.JSONKEY_ACTUALRESULTS_NOCOMPARISON] ;
200 # if None, then include ALL sections.
201 def _GetActualResults(self, json_url, sections=None):
epoger@google.com66ba9f92013-07-11 19:20:30 +0000202 try:
203 json_contents = self._GetFileContents(json_url)
204 except _InternalException:
205 print >> sys.stderr, (
206 'could not read json_url %s ; skipping this platform.' %
207 json_url)
208 return None
epoger@google.come78d2072013-06-12 17:44:14 +0000209 json_dict = gm_json.LoadFromString(json_contents)
210 results_to_return = {}
211 actual_results = json_dict[gm_json.JSONKEY_ACTUALRESULTS]
212 if not sections:
213 sections = actual_results.keys()
214 for section in sections:
215 section_results = actual_results[section]
216 if section_results:
217 results_to_return.update(section_results)
218 return results_to_return
219
epoger@google.com99a8ec92013-06-19 18:56:59 +0000220 # Rebaseline all tests/types we specified in the constructor,
epoger@google.come94a7d22013-07-23 19:37:03 +0000221 # within this expectations/gm subdir.
epoger@google.com99a8ec92013-06-19 18:56:59 +0000222 #
223 # params:
224 # subdir : e.g. 'base-shuttle-win7-intel-float'
225 # builder : e.g. 'Test-Win7-ShuttleA-HD2000-x86-Release'
226 def RebaselineSubdir(self, subdir, builder):
epoger@google.coma783f2b2013-07-08 17:51:58 +0000227 # Read in the actual result summary, and extract all the tests whose
228 # results we need to update.
229 actuals_url = '/'.join([self._actuals_base_url,
230 subdir, builder, subdir,
231 self._actuals_filename])
epoger@google.comb248dd52013-07-17 00:09:10 +0000232 # In most cases, we won't need to re-record results that are already
233 # succeeding, but including the SUCCEEDED results will allow us to
234 # re-record expectations if they somehow get out of sync.
235 sections = [gm_json.JSONKEY_ACTUALRESULTS_FAILED,
236 gm_json.JSONKEY_ACTUALRESULTS_SUCCEEDED]
epoger@google.coma783f2b2013-07-08 17:51:58 +0000237 if self._add_new:
238 sections.append(gm_json.JSONKEY_ACTUALRESULTS_NOCOMPARISON)
239 results_to_update = self._GetActualResults(json_url=actuals_url,
240 sections=sections)
epoger@google.come78d2072013-06-12 17:44:14 +0000241
epoger@google.coma783f2b2013-07-08 17:51:58 +0000242 # Read in current expectations.
epoger@google.comc60e7452013-07-24 19:36:51 +0000243 expectations_input_filepath = os.path.join(
244 self._expectations_root, subdir, self._expectations_input_filename)
245 expectations_dict = gm_json.LoadFromFile(expectations_input_filepath)
epoger@google.com4b383012013-07-16 21:10:54 +0000246 expected_results = expectations_dict[gm_json.JSONKEY_EXPECTEDRESULTS]
epoger@google.coma783f2b2013-07-08 17:51:58 +0000247
248 # Update the expectations in memory, skipping any tests/configs that
249 # the caller asked to exclude.
250 skipped_images = []
251 if results_to_update:
252 for (image_name, image_results) in results_to_update.iteritems():
epoger@google.com61822a22013-07-16 18:56:32 +0000253 (test, config) = \
254 self._image_filename_re.match(image_name).groups()
epoger@google.coma783f2b2013-07-08 17:51:58 +0000255 if self._tests:
256 if test not in self._tests:
257 skipped_images.append(image_name)
258 continue
259 if self._configs:
260 if config not in self._configs:
261 skipped_images.append(image_name)
262 continue
epoger@google.com4b383012013-07-16 21:10:54 +0000263 if not expected_results.get(image_name):
264 expected_results[image_name] = {}
265 expected_results[image_name] \
epoger@google.com61822a22013-07-16 18:56:32 +0000266 [gm_json.JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS] = \
267 [image_results]
epoger@google.coma783f2b2013-07-08 17:51:58 +0000268
269 # Write out updated expectations.
epoger@google.comc60e7452013-07-24 19:36:51 +0000270 expectations_output_filepath = os.path.join(
271 self._expectations_root, subdir, self._expectations_output_filename)
272 gm_json.WriteToFile(expectations_dict, expectations_output_filepath)
epoger@google.coma783f2b2013-07-08 17:51:58 +0000273
epoger@google.com27e1c002013-07-24 15:38:39 +0000274 # Mark the JSON file as plaintext, so text-style diffs can be applied.
275 # Fixes https://code.google.com/p/skia/issues/detail?id=1442
276 if self._using_svn:
277 self._Call(['svn', 'propset', '--quiet', 'svn:mime-type',
epoger@google.comc60e7452013-07-24 19:36:51 +0000278 'text/x-json', expectations_output_filepath])
epoger@google.comec3397b2013-05-29 17:09:43 +0000279
epoger@google.com9166bf52013-05-30 15:46:19 +0000280# main...
epoger@google.comec3397b2013-05-29 17:09:43 +0000281
epoger@google.com9166bf52013-05-30 15:46:19 +0000282parser = argparse.ArgumentParser()
epoger@google.coma783f2b2013-07-08 17:51:58 +0000283parser.add_argument('--actuals-base-url',
284 help='base URL from which to read files containing JSON ' +
285 'summaries of actual GM results; defaults to %(default)s',
286 default='http://skia-autogen.googlecode.com/svn/gm-actual')
287parser.add_argument('--actuals-filename',
288 help='filename (within platform-specific subdirectories ' +
289 'of ACTUALS_BASE_URL) to read a summary of results from; ' +
290 'defaults to %(default)s',
291 default='actual-results.json')
292# TODO(epoger): Add test that exercises --add-new argument.
epoger@google.comdad53102013-06-12 14:25:30 +0000293parser.add_argument('--add-new', action='store_true',
294 help='in addition to the standard behavior of ' +
295 'updating expectations for failing tests, add ' +
296 'expectations for tests which don\'t have expectations ' +
297 'yet.')
epoger@google.coma783f2b2013-07-08 17:51:58 +0000298# TODO(epoger): Add test that exercises --configs argument.
epoger@google.com9166bf52013-05-30 15:46:19 +0000299parser.add_argument('--configs', metavar='CONFIG', nargs='+',
300 help='which configurations to rebaseline, e.g. ' +
epoger@google.com9de25e32013-07-10 15:27:18 +0000301 '"--configs 565 8888", as a filter over the full set of ' +
302 'results in ACTUALS_FILENAME; if unspecified, rebaseline ' +
303 '*all* configs that are available.')
epoger@google.coma783f2b2013-07-08 17:51:58 +0000304# TODO(epoger): The --dry-run argument will no longer be needed once we
305# are only rebaselining JSON files.
epoger@google.com82f31782013-06-11 15:45:46 +0000306parser.add_argument('--dry-run', action='store_true',
epoger@google.com9166bf52013-05-30 15:46:19 +0000307 help='instead of actually downloading files or adding ' +
308 'files to checkout, display a list of operations that ' +
309 'we would normally perform')
epoger@google.coma783f2b2013-07-08 17:51:58 +0000310parser.add_argument('--expectations-filename',
311 help='filename (under EXPECTATIONS_ROOT) to read ' +
312 'current expectations from, and to write new ' +
epoger@google.comc60e7452013-07-24 19:36:51 +0000313 'expectations into (unless a separate ' +
314 'EXPECTATIONS_FILENAME_OUTPUT has been specified); ' +
315 'defaults to %(default)s',
epoger@google.coma783f2b2013-07-08 17:51:58 +0000316 default='expected-results.json')
epoger@google.comc60e7452013-07-24 19:36:51 +0000317parser.add_argument('--expectations-filename-output',
318 help='filename (under EXPECTATIONS_ROOT) to write ' +
319 'updated expectations into; by default, overwrites the ' +
320 'input file (EXPECTATIONS_FILENAME)',
321 default='')
epoger@google.com99a8ec92013-06-19 18:56:59 +0000322parser.add_argument('--expectations-root',
323 help='root of expectations directory to update-- should ' +
324 'contain one or more base-* subdirectories. Defaults to ' +
325 '%(default)s',
epoger@google.come94a7d22013-07-23 19:37:03 +0000326 default=os.path.join('expectations', 'gm'))
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000327parser.add_argument('--keep-going-on-failure', action='store_true',
328 help='instead of halting at the first error encountered, ' +
329 'keep going and rebaseline as many tests as possible, ' +
330 'and then report the full set of errors at the end')
epoger@google.com9166bf52013-05-30 15:46:19 +0000331parser.add_argument('--subdirs', metavar='SUBDIR', nargs='+',
332 help='which platform subdirectories to rebaseline; ' +
333 'if unspecified, rebaseline all subdirs, same as ' +
334 '"--subdirs %s"' % ' '.join(sorted(SUBDIR_MAPPING.keys())))
epoger@google.coma783f2b2013-07-08 17:51:58 +0000335# TODO(epoger): Add test that exercises --tests argument.
epoger@google.com99ba65a2013-06-05 15:43:37 +0000336parser.add_argument('--tests', metavar='TEST', nargs='+',
epoger@google.com9166bf52013-05-30 15:46:19 +0000337 help='which tests to rebaseline, e.g. ' +
epoger@google.com9de25e32013-07-10 15:27:18 +0000338 '"--tests aaclip bigmatrix", as a filter over the full ' +
339 'set of results in ACTUALS_FILENAME; if unspecified, ' +
340 'rebaseline *all* tests that are available.')
epoger@google.com9166bf52013-05-30 15:46:19 +0000341args = parser.parse_args()
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000342exception_handler = ExceptionHandler(
343 keep_going_on_failure=args.keep_going_on_failure)
epoger@google.com99a8ec92013-06-19 18:56:59 +0000344if args.subdirs:
345 subdirs = args.subdirs
346 missing_json_is_fatal = True
347else:
348 subdirs = sorted(SUBDIR_MAPPING.keys())
349 missing_json_is_fatal = False
350for subdir in subdirs:
351 if not subdir in SUBDIR_MAPPING.keys():
352 raise Exception(('unrecognized platform subdir "%s"; ' +
353 'should be one of %s') % (
354 subdir, SUBDIR_MAPPING.keys()))
355 builder = SUBDIR_MAPPING[subdir]
356
357 # We instantiate different Rebaseliner objects depending
358 # on whether we are rebaselining an expected-results.json file, or
epoger@google.come94a7d22013-07-23 19:37:03 +0000359 # individual image files. Different expectations/gm subdirectories may move
epoger@google.com99a8ec92013-06-19 18:56:59 +0000360 # from individual image files to JSON-format expectations at different
361 # times, so we need to make this determination per subdirectory.
362 #
363 # See https://goto.google.com/ChecksumTransitionDetail
364 expectations_json_file = os.path.join(args.expectations_root, subdir,
epoger@google.coma783f2b2013-07-08 17:51:58 +0000365 args.expectations_filename)
epoger@google.com99a8ec92013-06-19 18:56:59 +0000366 if os.path.isfile(expectations_json_file):
epoger@google.com99a8ec92013-06-19 18:56:59 +0000367 rebaseliner = JsonRebaseliner(
368 expectations_root=args.expectations_root,
epoger@google.comc60e7452013-07-24 19:36:51 +0000369 expectations_input_filename=args.expectations_filename,
370 expectations_output_filename=(args.expectations_filename_output or
371 args.expectations_filename),
epoger@google.com99a8ec92013-06-19 18:56:59 +0000372 tests=args.tests, configs=args.configs,
epoger@google.coma783f2b2013-07-08 17:51:58 +0000373 actuals_base_url=args.actuals_base_url,
374 actuals_filename=args.actuals_filename,
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000375 exception_handler=exception_handler,
epoger@google.coma783f2b2013-07-08 17:51:58 +0000376 add_new=args.add_new)
epoger@google.com99a8ec92013-06-19 18:56:59 +0000377 else:
epoger@google.com89fa4b92013-07-10 16:54:10 +0000378 # TODO(epoger): When we get rid of the ImageRebaseliner implementation,
379 # we should raise an Exception in this case (no JSON expectations file
380 # found to update), to prevent a recurrence of
381 # https://code.google.com/p/skia/issues/detail?id=1403 ('rebaseline.py
382 # script fails with misleading output when run outside of gm-expected
383 # dir')
epoger@google.com99a8ec92013-06-19 18:56:59 +0000384 rebaseliner = rebaseline_imagefiles.ImageRebaseliner(
385 expectations_root=args.expectations_root,
386 tests=args.tests, configs=args.configs,
387 dry_run=args.dry_run,
epoger@google.coma783f2b2013-07-08 17:51:58 +0000388 json_base_url=args.actuals_base_url,
389 json_filename=args.actuals_filename,
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000390 exception_handler=exception_handler,
epoger@google.com99a8ec92013-06-19 18:56:59 +0000391 add_new=args.add_new,
392 missing_json_is_fatal=missing_json_is_fatal)
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000393
epoger@google.com3e7399f2013-07-10 17:23:47 +0000394 try:
395 rebaseliner.RebaselineSubdir(subdir=subdir, builder=builder)
396 except BaseException as e:
epoger@google.comffcbdbf2013-07-16 17:35:39 +0000397 exception_handler.RaiseExceptionOrContinue(e)
398
399exception_handler.ReportAllFailures()