OLD | NEW |
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 outfilename=outfilename) | 252 outfilename=outfilename) |
253 | 253 |
254 # main... | 254 # main... |
255 | 255 |
256 parser = argparse.ArgumentParser() | 256 parser = argparse.ArgumentParser() |
257 parser.add_argument('--configs', metavar='CONFIG', nargs='+', | 257 parser.add_argument('--configs', metavar='CONFIG', nargs='+', |
258 help='which configurations to rebaseline, e.g. ' + | 258 help='which configurations to rebaseline, e.g. ' + |
259 '"--configs 565 8888"; if unspecified, run a default ' + | 259 '"--configs 565 8888"; if unspecified, run a default ' + |
260 'set of configs. This should ONLY be specified if ' + | 260 'set of configs. This should ONLY be specified if ' + |
261 '--tests has also been specified.') | 261 '--tests has also been specified.') |
262 parser.add_argument('--dry_run', action='store_true', | 262 parser.add_argument('--dry-run', action='store_true', |
263 help='instead of actually downloading files or adding ' + | 263 help='instead of actually downloading files or adding ' + |
264 'files to checkout, display a list of operations that ' + | 264 'files to checkout, display a list of operations that ' + |
265 'we would normally perform') | 265 'we would normally perform') |
266 parser.add_argument('--json_base_url', | 266 parser.add_argument('--json-base-url', |
267 help='base URL from which to read JSON_FILENAME ' + | 267 help='base URL from which to read JSON_FILENAME ' + |
268 'files; defaults to %(default)s', | 268 'files; defaults to %(default)s', |
269 default='http://skia-autogen.googlecode.com/svn/gm-actual') | 269 default='http://skia-autogen.googlecode.com/svn/gm-actual') |
270 parser.add_argument('--json_filename', | 270 parser.add_argument('--json-filename', |
271 help='filename (under JSON_BASE_URL) to read a summary ' + | 271 help='filename (under JSON_BASE_URL) to read a summary ' + |
272 'of results from; defaults to %(default)s', | 272 'of results from; defaults to %(default)s', |
273 default='actual-results.json') | 273 default='actual-results.json') |
274 parser.add_argument('--subdirs', metavar='SUBDIR', nargs='+', | 274 parser.add_argument('--subdirs', metavar='SUBDIR', nargs='+', |
275 help='which platform subdirectories to rebaseline; ' + | 275 help='which platform subdirectories to rebaseline; ' + |
276 'if unspecified, rebaseline all subdirs, same as ' + | 276 'if unspecified, rebaseline all subdirs, same as ' + |
277 '"--subdirs %s"' % ' '.join(sorted(SUBDIR_MAPPING.keys()))) | 277 '"--subdirs %s"' % ' '.join(sorted(SUBDIR_MAPPING.keys()))) |
278 parser.add_argument('--tests', metavar='TEST', nargs='+', | 278 parser.add_argument('--tests', metavar='TEST', nargs='+', |
279 help='which tests to rebaseline, e.g. ' + | 279 help='which tests to rebaseline, e.g. ' + |
280 '"--tests aaclip bigmatrix"; if unspecified, then all ' + | 280 '"--tests aaclip bigmatrix"; if unspecified, then all ' + |
281 'failing tests (according to the actual-results.json ' + | 281 'failing tests (according to the actual-results.json ' + |
282 'file) will be rebaselined.') | 282 'file) will be rebaselined.') |
283 args = parser.parse_args() | 283 args = parser.parse_args() |
284 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, | 284 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, |
285 subdirs=args.subdirs, dry_run=args.dry_run, | 285 subdirs=args.subdirs, dry_run=args.dry_run, |
286 json_base_url=args.json_base_url, | 286 json_base_url=args.json_base_url, |
287 json_filename=args.json_filename) | 287 json_filename=args.json_filename) |
288 rebaseliner.RebaselineAll() | 288 rebaseliner.RebaselineAll() |
OLD | NEW |