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

Side by Side Diff: tools/rebaseline.py

Issue 23514068: rebaseline.py: make builder names copy-pastable from --help output (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 gm_json.WriteToFile(expectations_dict, expectations_output_filepath) 322 gm_json.WriteToFile(expectations_dict, expectations_output_filepath)
323 323
324 # Mark the JSON file as plaintext, so text-style diffs can be applied. 324 # Mark the JSON file as plaintext, so text-style diffs can be applied.
325 # Fixes https://code.google.com/p/skia/issues/detail?id=1442 325 # Fixes https://code.google.com/p/skia/issues/detail?id=1442
326 if self._using_svn: 326 if self._using_svn:
327 self._Call(['svn', 'propset', '--quiet', 'svn:mime-type', 327 self._Call(['svn', 'propset', '--quiet', 'svn:mime-type',
328 'text/x-json', expectations_output_filepath]) 328 'text/x-json', expectations_output_filepath])
329 329
330 # main... 330 # main...
331 331
332 parser = argparse.ArgumentParser() 332 parser = argparse.ArgumentParser(
333 formatter_class=argparse.RawDescriptionHelpFormatter,
334 epilog='Here is the full set of builders we know about:' +
epoger 2013/09/18 14:46:16 Unfortunately, if we want ANY control over the for
335 '\n '.join([''] + sorted(TEST_BUILDERS)))
333 parser.add_argument('--actuals-base-url', 336 parser.add_argument('--actuals-base-url',
334 help=('base URL from which to read files containing JSON ' 337 help=('base URL from which to read files containing JSON '
335 'summaries of actual GM results; defaults to ' 338 'summaries of actual GM results; defaults to '
336 '%(default)s'), 339 '%(default)s'),
337 default='http://skia-autogen.googlecode.com/svn/gm-actual') 340 default='http://skia-autogen.googlecode.com/svn/gm-actual')
338 parser.add_argument('--actuals-filename', 341 parser.add_argument('--actuals-filename',
339 help=('filename (within builder-specific subdirectories ' 342 help=('filename (within builder-specific subdirectories '
340 'of ACTUALS_BASE_URL) to read a summary of results ' 343 'of ACTUALS_BASE_URL) to read a summary of results '
341 'from; defaults to %(default)s'), 344 'from; defaults to %(default)s'),
342 default='actual-results.json') 345 default='actual-results.json')
343 parser.add_argument('--add-new', action='store_true', 346 parser.add_argument('--add-new', action='store_true',
344 help=('in addition to the standard behavior of ' 347 help=('in addition to the standard behavior of '
345 'updating expectations for failing tests, add ' 348 'updating expectations for failing tests, add '
346 'expectations for tests which don\'t have ' 349 'expectations for tests which don\'t have '
347 'expectations yet.')) 350 'expectations yet.'))
348 parser.add_argument('--bugs', metavar='BUG', type=int, nargs='+', 351 parser.add_argument('--bugs', metavar='BUG', type=int, nargs='+',
349 help=('Skia bug numbers (under ' 352 help=('Skia bug numbers (under '
350 'https://code.google.com/p/skia/issues/list ) which ' 353 'https://code.google.com/p/skia/issues/list ) which '
351 'pertain to this set of rebaselines.')) 354 'pertain to this set of rebaselines.'))
352 parser.add_argument('--builders', metavar='BUILDER', nargs='+', 355 parser.add_argument('--builders', metavar='BUILDER', nargs='+',
353 help=('which platforms to rebaseline; ' 356 help=('which platforms to rebaseline; '
354 'if unspecified, rebaseline all platforms, same as ' 357 'if unspecified, rebaseline all known platforms '
355 '"--builders %s"' % ' '.join(sorted(TEST_BUILDERS)))) 358 '(see below for a list)'))
356 # TODO(epoger): Add test that exercises --configs argument. 359 # TODO(epoger): Add test that exercises --configs argument.
357 parser.add_argument('--configs', metavar='CONFIG', nargs='+', 360 parser.add_argument('--configs', metavar='CONFIG', nargs='+',
358 help=('which configurations to rebaseline, e.g. ' 361 help=('which configurations to rebaseline, e.g. '
359 '"--configs 565 8888", as a filter over the full set ' 362 '"--configs 565 8888", as a filter over the full set '
360 'of results in ACTUALS_FILENAME; if unspecified, ' 363 'of results in ACTUALS_FILENAME; if unspecified, '
361 'rebaseline *all* configs that are available.')) 364 'rebaseline *all* configs that are available.'))
362 parser.add_argument('--expectations-filename', 365 parser.add_argument('--expectations-filename',
363 help=('filename (under EXPECTATIONS_ROOT) to read ' 366 help=('filename (under EXPECTATIONS_ROOT) to read '
364 'current expectations from, and to write new ' 367 'current expectations from, and to write new '
365 'expectations into (unless a separate ' 368 'expectations into (unless a separate '
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 except: 436 except:
434 exception_handler.RaiseExceptionOrContinue() 437 exception_handler.RaiseExceptionOrContinue()
435 else: 438 else:
436 try: 439 try:
437 raise _InternalException('expectations_json_file %s not found' % 440 raise _InternalException('expectations_json_file %s not found' %
438 expectations_json_file) 441 expectations_json_file)
439 except: 442 except:
440 exception_handler.RaiseExceptionOrContinue() 443 exception_handler.RaiseExceptionOrContinue()
441 444
442 exception_handler.ReportAllFailures() 445 exception_handler.ReportAllFailures()
OLDNEW
« 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