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 import collections | 9 import collections |
10 import logging | 10 import logging |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 # TODO(gkanwar): Move these to Common Options once we have the plumbing | 114 # TODO(gkanwar): Move these to Common Options once we have the plumbing |
115 # in our other test types to handle these commands | 115 # in our other test types to handle these commands |
116 AddCommonOptions(option_parser) | 116 AddCommonOptions(option_parser) |
117 | 117 |
118 | 118 |
119 def AddLinkerTestOptions(option_parser): | 119 def AddLinkerTestOptions(option_parser): |
120 option_parser.usage = '%prog linker' | 120 option_parser.usage = '%prog linker' |
121 option_parser.commands_dict = {} | 121 option_parser.commands_dict = {} |
122 option_parser.example = '%prog linker' | 122 option_parser.example = '%prog linker' |
123 | 123 |
| 124 option_parser.add_option('-f', '--gtest-filter', dest='test_filter', |
| 125 help='googletest-style filter string.') |
124 AddCommonOptions(option_parser) | 126 AddCommonOptions(option_parser) |
125 | 127 |
126 | 128 |
127 def ProcessGTestOptions(options): | 129 def ProcessGTestOptions(options): |
128 """Intercept test suite help to list test suites. | 130 """Intercept test suite help to list test suites. |
129 | 131 |
130 Args: | 132 Args: |
131 options: Command line options. | 133 options: Command line options. |
132 """ | 134 """ |
133 if options.suite_name == 'help': | 135 if options.suite_name == 'help': |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 761 |
760 | 762 |
761 def main(argv): | 763 def main(argv): |
762 option_parser = command_option_parser.CommandOptionParser( | 764 option_parser = command_option_parser.CommandOptionParser( |
763 commands_dict=VALID_COMMANDS) | 765 commands_dict=VALID_COMMANDS) |
764 return command_option_parser.ParseAndExecute(option_parser) | 766 return command_option_parser.ParseAndExecute(option_parser) |
765 | 767 |
766 | 768 |
767 if __name__ == '__main__': | 769 if __name__ == '__main__': |
768 sys.exit(main(sys.argv)) | 770 sys.exit(main(sys.argv)) |
OLD | NEW |