Chromium Code Reviews| 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 argparse | 9 import argparse |
| 10 import collections | 10 import collections |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 | 189 |
| 190 gtest_suites = list(gtest_config.STABLE_TEST_SUITES | 190 gtest_suites = list(gtest_config.STABLE_TEST_SUITES |
| 191 + gtest_config.EXPERIMENTAL_TEST_SUITES) | 191 + gtest_config.EXPERIMENTAL_TEST_SUITES) |
| 192 | 192 |
| 193 group = parser.add_argument_group('GTest Options') | 193 group = parser.add_argument_group('GTest Options') |
| 194 group.add_argument('-s', '--suite', dest='suite_name', | 194 group.add_argument('-s', '--suite', dest='suite_name', |
| 195 nargs='+', metavar='SUITE_NAME', required=True, | 195 nargs='+', metavar='SUITE_NAME', required=True, |
| 196 help=('Executable name of the test suite to run. ' | 196 help=('Executable name of the test suite to run. ' |
| 197 'Available suites include (but are not limited to): ' | 197 'Available suites include (but are not limited to): ' |
| 198 '%s' % ', '.join('"%s"' % s for s in gtest_suites))) | 198 '%s' % ', '.join('"%s"' % s for s in gtest_suites))) |
| 199 group.add_argument('-f', '--gtest_filter', '--gtest-filter', | |
| 200 dest='test_filter', | |
| 201 help='googletest-style filter string.') | |
| 202 group.add_argument('--gtest_also_run_disabled_tests', | 199 group.add_argument('--gtest_also_run_disabled_tests', |
| 203 '--gtest-also-run-disabled-tests', | 200 '--gtest-also-run-disabled-tests', |
| 204 dest='run_disabled', action='store_true', | 201 dest='run_disabled', action='store_true', |
| 205 help='Also run disabled tests if applicable.') | 202 help='Also run disabled tests if applicable.') |
| 206 group.add_argument('-a', '--test-arguments', dest='test_arguments', | 203 group.add_argument('-a', '--test-arguments', dest='test_arguments', |
| 207 default='', | 204 default='', |
| 208 help='Additional arguments to pass to the test.') | 205 help='Additional arguments to pass to the test.') |
| 209 group.add_argument('-t', dest='timeout', type=int, default=60, | 206 group.add_argument('-t', dest='timeout', type=int, default=60, |
| 210 help='Timeout to wait for each test ' | 207 help='Timeout to wait for each test ' |
| 211 '(default: %(default)s).') | 208 '(default: %(default)s).') |
| 212 group.add_argument('--isolate_file_path', | 209 group.add_argument('--isolate_file_path', |
| 213 '--isolate-file-path', | 210 '--isolate-file-path', |
| 214 dest='isolate_file_path', | 211 dest='isolate_file_path', |
| 215 help='.isolate file path to override the default ' | 212 help='.isolate file path to override the default ' |
| 216 'path') | 213 'path') |
| 214 | |
| 215 filter_group = group.add_mutually_exclusive_group() | |
| 216 filter_group.add_argument('-f', '--gtest_filter', '--gtest-filter', | |
| 217 dest='test_filter', | |
| 218 help='googletest-style filter string.') | |
| 219 filter_group.add_argument('--gtest-filter-file', dest='test_filter_file', | |
| 220 help='Path to file that contains gtest-style ' | |
|
klundberg
2015/02/02 20:05:55
nit: above the help text use "googletest-style", h
jbudorick
2015/02/02 21:36:23
switched this one to "googletest-style"
| |
| 221 'filter strings. (Lines will be joined with ' | |
| 222 '":" to create a single filter string.)') | |
| 223 | |
| 217 AddDeviceOptions(parser) | 224 AddDeviceOptions(parser) |
| 218 AddCommonOptions(parser) | 225 AddCommonOptions(parser) |
| 219 AddRemoteDeviceOptions(parser) | 226 AddRemoteDeviceOptions(parser) |
| 220 | 227 |
| 221 | 228 |
| 222 def AddLinkerTestOptions(parser): | 229 def AddLinkerTestOptions(parser): |
| 223 group = parser.add_argument_group('Linker Test Options') | 230 group = parser.add_argument_group('Linker Test Options') |
| 224 group.add_argument('-f', '--gtest-filter', dest='test_filter', | 231 group.add_argument('-f', '--gtest-filter', dest='test_filter', |
| 225 help='googletest-style filter string.') | 232 help='googletest-style filter string.') |
| 226 AddCommonOptions(parser) | 233 AddCommonOptions(parser) |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 subparser = command_parsers.add_parser( | 1008 subparser = command_parsers.add_parser( |
| 1002 test_type, usage='%(prog)s [options]', help=config.help_txt) | 1009 test_type, usage='%(prog)s [options]', help=config.help_txt) |
| 1003 config.add_options_func(subparser) | 1010 config.add_options_func(subparser) |
| 1004 | 1011 |
| 1005 args = parser.parse_args() | 1012 args = parser.parse_args() |
| 1006 return RunTestsCommand(args, parser) | 1013 return RunTestsCommand(args, parser) |
| 1007 | 1014 |
| 1008 | 1015 |
| 1009 if __name__ == '__main__': | 1016 if __name__ == '__main__': |
| 1010 sys.exit(main()) | 1017 sys.exit(main()) |
| OLD | NEW |