OLD | NEW |
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 cmd_helper.OutDirectory.set(options.out_directory) | 119 cmd_helper.OutDirectory.set(options.out_directory) |
120 run_tests_helper.SetLogLevel(options.verbose_count) | 120 run_tests_helper.SetLogLevel(options.verbose_count) |
121 | 121 |
122 | 122 |
123 def AddCoreGTestOptions(option_parser, default_timeout=60): | 123 def AddCoreGTestOptions(option_parser, default_timeout=60): |
124 """Add options specific to the gtest framework to |option_parser|.""" | 124 """Add options specific to the gtest framework to |option_parser|.""" |
125 | 125 |
126 # TODO(gkanwar): Consolidate and clean up test filtering for gtests and | 126 # TODO(gkanwar): Consolidate and clean up test filtering for gtests and |
127 # content_browsertests. | 127 # content_browsertests. |
128 option_parser.add_option('--gtest_filter', dest='test_filter', | 128 option_parser.add_option('--gtest_filter', dest='test_filter', |
129 help='Filter GTests by name.') | 129 help='googletest-style filter string.') |
130 option_parser.add_option('-a', '--test_arguments', dest='test_arguments', | 130 option_parser.add_option('-a', '--test_arguments', dest='test_arguments', |
131 help='Additional arguments to pass to the test.') | 131 help='Additional arguments to pass to the test.') |
132 # TODO(gkanwar): Most likely deprecate/remove this option once we've pinned | 132 # TODO(gkanwar): Most likely deprecate/remove this option once we've pinned |
133 # down what we're doing with the emulator setup. | 133 # down what we're doing with the emulator setup. |
134 option_parser.add_option('-x', '--xvfb', dest='use_xvfb', | 134 option_parser.add_option('-x', '--xvfb', dest='use_xvfb', |
135 action='store_true', | 135 action='store_true', |
136 help='Use Xvfb around tests (ignored if not Linux).') | 136 help='Use Xvfb around tests (ignored if not Linux).') |
137 # TODO(gkanwar): Possible deprecate this flag. Waiting on word from Peter | 137 # TODO(gkanwar): Possible deprecate this flag. Waiting on word from Peter |
138 # Beverloo. | 138 # Beverloo. |
139 option_parser.add_option('--webkit', action='store_true', | 139 option_parser.add_option('--webkit', action='store_true', |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 return 0 | 526 return 0 |
527 command = argv[1] | 527 command = argv[1] |
528 VALID_COMMANDS[command].add_options_func(option_parser) | 528 VALID_COMMANDS[command].add_options_func(option_parser) |
529 options, args = option_parser.parse_args(argv) | 529 options, args = option_parser.parse_args(argv) |
530 return VALID_COMMANDS[command].run_command_func( | 530 return VALID_COMMANDS[command].run_command_func( |
531 command, options, args, option_parser) | 531 command, options, args, option_parser) |
532 | 532 |
533 | 533 |
534 if __name__ == '__main__': | 534 if __name__ == '__main__': |
535 sys.exit(main(sys.argv)) | 535 sys.exit(main(sys.argv)) |
OLD | NEW |