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

Side by Side Diff: tools/rebaseline.py

Issue 23899003: rebaseline.py: fix --add-new when there are no expectations at all (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: turn_on_add_new_flag Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 ''' 3 '''
4 Copyright 2012 Google Inc. 4 Copyright 2012 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 ''' 8 '''
9 9
10 ''' 10 '''
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 parser = argparse.ArgumentParser() 297 parser = argparse.ArgumentParser()
298 parser.add_argument('--actuals-base-url', 298 parser.add_argument('--actuals-base-url',
299 help='base URL from which to read files containing JSON ' + 299 help='base URL from which to read files containing JSON ' +
300 'summaries of actual GM results; defaults to %(default)s', 300 'summaries of actual GM results; defaults to %(default)s',
301 default='http://skia-autogen.googlecode.com/svn/gm-actual') 301 default='http://skia-autogen.googlecode.com/svn/gm-actual')
302 parser.add_argument('--actuals-filename', 302 parser.add_argument('--actuals-filename',
303 help='filename (within builder-specific subdirectories ' + 303 help='filename (within builder-specific subdirectories ' +
304 'of ACTUALS_BASE_URL) to read a summary of results from; ' + 304 'of ACTUALS_BASE_URL) to read a summary of results from; ' +
305 'defaults to %(default)s', 305 'defaults to %(default)s',
306 default='actual-results.json') 306 default='actual-results.json')
307 # TODO(epoger): Add test that exercises --add-new argument.
308 parser.add_argument('--add-new', action='store_true', 307 parser.add_argument('--add-new', action='store_true',
309 help='in addition to the standard behavior of ' + 308 help='in addition to the standard behavior of ' +
310 'updating expectations for failing tests, add ' + 309 'updating expectations for failing tests, add ' +
311 'expectations for tests which don\'t have expectations ' + 310 'expectations for tests which don\'t have expectations ' +
312 'yet.') 311 'yet.')
313 parser.add_argument('--builders', metavar='BUILDER', nargs='+', 312 parser.add_argument('--builders', metavar='BUILDER', nargs='+',
314 help='which platforms to rebaseline; ' + 313 help='which platforms to rebaseline; ' +
315 'if unspecified, rebaseline all platforms, same as ' + 314 'if unspecified, rebaseline all platforms, same as ' +
316 '"--builders %s"' % ' '.join(sorted(TEST_BUILDERS))) 315 '"--builders %s"' % ' '.join(sorted(TEST_BUILDERS)))
317 # TODO(epoger): Add test that exercises --configs argument. 316 # TODO(epoger): Add test that exercises --configs argument.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 add_new=args.add_new) 376 add_new=args.add_new)
378 try: 377 try:
379 rebaseliner.RebaselineSubdir(builder=builder) 378 rebaseliner.RebaselineSubdir(builder=builder)
380 except BaseException as e: 379 except BaseException as e:
381 exception_handler.RaiseExceptionOrContinue(e) 380 exception_handler.RaiseExceptionOrContinue(e)
382 else: 381 else:
383 exception_handler.RaiseExceptionOrContinue(_InternalException( 382 exception_handler.RaiseExceptionOrContinue(_InternalException(
384 'expectations_json_file %s not found' % expectations_json_file)) 383 'expectations_json_file %s not found' % expectations_json_file))
385 384
386 exception_handler.ReportAllFailures() 385 exception_handler.ReportAllFailures()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698