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

Side by Side Diff: build/android/test_runner.py

Issue 23294002: Fixes test runner command line (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs all types of tests from one unified interface. 7 """Runs all types of tests from one unified interface.
8 8
9 TODO(gkanwar): 9 TODO(gkanwar):
10 * Add options to run Monkey tests. 10 * Add options to run Monkey tests.
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 return '\nExample:\n %s\n' % self.example 727 return '\nExample:\n %s\n' % self.example
728 return '' 728 return ''
729 729
730 730
731 def main(argv): 731 def main(argv):
732 option_parser = CommandOptionParser( 732 option_parser = CommandOptionParser(
733 usage='Usage: %prog <command> [options]', 733 usage='Usage: %prog <command> [options]',
734 command_list=VALID_COMMANDS.keys()) 734 command_list=VALID_COMMANDS.keys())
735 735
736 if len(argv) < 2 or argv[1] not in VALID_COMMANDS: 736 if len(argv) < 2 or argv[1] not in VALID_COMMANDS:
737 # Parse args first, if this is '--help', optparse will display help and exit
738 option_parser.parse_args(argv)
737 option_parser.error('Invalid command.') 739 option_parser.error('Invalid command.')
738 command = argv[1] 740 command = argv[1]
739 VALID_COMMANDS[command].add_options_func(option_parser) 741 VALID_COMMANDS[command].add_options_func(option_parser)
740 options, args = option_parser.parse_args(argv) 742 options, args = option_parser.parse_args(argv)
741 return VALID_COMMANDS[command].run_command_func( 743 return VALID_COMMANDS[command].run_command_func(
742 command, options, args, option_parser) 744 command, options, args, option_parser)
743 745
744 746
745 if __name__ == '__main__': 747 if __name__ == '__main__':
746 sys.exit(main(sys.argv)) 748 sys.exit(main(sys.argv))
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