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

Side by Side Diff: tools/determinism/compare_build_artifacts.py

Issue 2278813002: Fix syntax error in compare_build_artifacts.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Compare the artifacts from two builds.""" 6 """Compare the artifacts from two builds."""
7 7
8 import difflib 8 import difflib
9 import json 9 import json
10 import optparse 10 import optparse
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 parser = optparse.OptionParser(usage='%prog [options]') 568 parser = optparse.OptionParser(usage='%prog [options]')
569 parser.add_option( 569 parser.add_option(
570 '-f', '--first-build-dir', help='The first build directory.') 570 '-f', '--first-build-dir', help='The first build directory.')
571 parser.add_option( 571 parser.add_option(
572 '-s', '--second-build-dir', help='The second build directory.') 572 '-s', '--second-build-dir', help='The second build directory.')
573 parser.add_option('-r', '--recursive', action='store_true', default=False, 573 parser.add_option('-r', '--recursive', action='store_true', default=False,
574 help='Indicates if the comparison should be recursive.') 574 help='Indicates if the comparison should be recursive.')
575 target = { 575 target = {
576 'darwin': 'mac', 'linux2': 'linux', 'win32': 'win' 576 'darwin': 'mac', 'linux2': 'linux', 'win32': 'win'
577 }.get(sys.platform, sys.platform) 577 }.get(sys.platform, sys.platform)
578 parser.add_option('-t', '--target-platform', help='The target platform.' 578 parser.add_option('-t', '--target-platform', help='The target platform.',
579 default=target, choices=('android', 'mac', 'linux', 'win')) 579 default=target, choices=('android', 'mac', 'linux', 'win'))
580 options, _ = parser.parse_args() 580 options, _ = parser.parse_args()
581 581
582 if not options.first_build_dir: 582 if not options.first_build_dir:
583 parser.error('--first-build-dir is required') 583 parser.error('--first-build-dir is required')
584 if not options.second_build_dir: 584 if not options.second_build_dir:
585 parser.error('--second-build-dir is required') 585 parser.error('--second-build-dir is required')
586 if not options.target_platform: 586 if not options.target_platform:
587 parser.error('--target-platform is required') 587 parser.error('--target-platform is required')
588 588
589 return compare_build_artifacts(os.path.abspath(options.first_build_dir), 589 return compare_build_artifacts(os.path.abspath(options.first_build_dir),
590 os.path.abspath(options.second_build_dir), 590 os.path.abspath(options.second_build_dir),
591 options.target_platform, 591 options.target_platform,
592 options.recursive) 592 options.recursive)
593 593
594 594
595 if __name__ == '__main__': 595 if __name__ == '__main__':
596 sys.exit(main()) 596 sys.exit(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