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

Side by Side Diff: gm/rebaseline_server/compare_to_expectations.py

Issue 210093003: fix compare_to_expectations command line launch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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
« 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 2013 Google Inc. 4 Copyright 2013 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 Repackage expected/actual GM results as needed by our HTML rebaseline viewer. 9 Repackage expected/actual GM results as needed by our HTML rebaseline viewer.
10 """ 10 """
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 461
462 def main(): 462 def main():
463 logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', 463 logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
464 datefmt='%m/%d/%Y %H:%M:%S', 464 datefmt='%m/%d/%Y %H:%M:%S',
465 level=logging.INFO) 465 level=logging.INFO)
466 parser = argparse.ArgumentParser() 466 parser = argparse.ArgumentParser()
467 parser.add_argument( 467 parser.add_argument(
468 '--actuals', default=DEFAULT_ACTUALS_DIR, 468 '--actuals', default=DEFAULT_ACTUALS_DIR,
469 help='Directory containing all actual-result JSON files') 469 help='Directory containing all actual-result JSON files; defaults to '
470 '\'%(default)s\' .')
470 parser.add_argument( 471 parser.add_argument(
471 '--expectations', default=DEFAULT_EXPECTATIONS_DIR, 472 '--expectations', default=DEFAULT_EXPECTATIONS_DIR,
472 help='Directory containing all expected-result JSON files; defaults to ' 473 help='Directory containing all expected-result JSON files; defaults to '
473 '\'%(default)s\' .') 474 '\'%(default)s\' .')
474 parser.add_argument( 475 parser.add_argument(
475 '--outfile', required=True, 476 '--outfile', required=True,
476 help='File to write result summary into, in JSON format.') 477 help='File to write result summary into, in JSON format.')
477 parser.add_argument( 478 parser.add_argument(
478 '--results', default=results.KEY__HEADER__RESULTS_FAILURES, 479 '--results', default=results.KEY__HEADER__RESULTS_FAILURES,
479 help='Which result types to include. Defaults to \'%(default)s\'; ' 480 help='Which result types to include. Defaults to \'%(default)s\'; '
480 'must be one of ' + 481 'must be one of ' +
481 str([results.KEY__HEADER__RESULTS_FAILURES, 482 str([results.KEY__HEADER__RESULTS_FAILURES,
482 results.KEY__HEADER__RESULTS_ALL])) 483 results.KEY__HEADER__RESULTS_ALL]))
483 parser.add_argument( 484 parser.add_argument(
484 '--workdir', default=DEFAULT_GENERATED_IMAGES_ROOT, 485 '--workdir', default=DEFAULT_GENERATED_IMAGES_ROOT,
485 help='Directory within which to download images and generate diffs; ' 486 help='Directory within which to download images and generate diffs; '
486 'defaults to \'%(default)s\' .') 487 'defaults to \'%(default)s\' .')
487 args = parser.parse_args() 488 args = parser.parse_args()
488 results = Results(actuals_root=args.actuals, 489 results_obj = Results(actuals_root=args.actuals,
489 expected_root=args.expectations, 490 expected_root=args.expectations,
490 generated_images_root=args.workdir) 491 generated_images_root=args.workdir)
491 gm_json.WriteToFile( 492 gm_json.WriteToFile(
492 results.get_packaged_results_of_type(results_type=args.results), 493 results_obj.get_packaged_results_of_type(results_type=args.results),
493 args.outfile) 494 args.outfile)
494 495
495 496
496 if __name__ == '__main__': 497 if __name__ == '__main__':
497 main() 498 main()
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