Chromium Code Reviews| Index: build/android/test_runner.py |
| diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
| index 5456eafc4757702574a879dff24306f74ea97f59..a768e3cde9a057edc81aa91e31ef5ecae7a7f02a 100755 |
| --- a/build/android/test_runner.py |
| +++ b/build/android/test_runner.py |
| @@ -21,6 +21,7 @@ from pylib.base import test_dispatcher |
| from pylib.gtest import gtest_config |
| from pylib.gtest import setup as gtest_setup |
| from pylib.gtest import test_options as gtest_test_options |
| +from pylib.linker import setup as linker_setup |
| from pylib.host_driven import setup as host_driven_setup |
| from pylib.instrumentation import setup as instrumentation_setup |
| from pylib.instrumentation import test_options as instrumentation_test_options |
| @@ -114,6 +115,12 @@ def AddGTestOptions(option_parser): |
| # in our other test types to handle these commands |
| AddCommonOptions(option_parser) |
|
bulach
2013/10/02 11:16:50
nit: another \n here and after this method
digit1
2013/10/02 14:01:52
Done.
|
| +def AddLinkerTestOptions(option_parser): |
| + option_parser.usage = '%prog linker' |
| + option_parser.commands_dict = {} |
| + option_parser.example = '%prog linker' |
| + |
| + AddCommonOptions(option_parser) |
| def ProcessGTestOptions(options): |
| """Intercept test suite help to list test suites. |
| @@ -498,6 +505,20 @@ def _RunGTests(options, error_func, devices): |
| return exit_code |
| +def _RunLinkerTests(options, error_func, devices): |
| + """Subcommand of RunTestsCommands which runs linker tests.""" |
| + runner_factory, tests = linker_setup.Setup(options, devices) |
| + |
| + results, exit_code = test_dispatcher.RunTests( |
| + tests, runner_factory, devices, shard=True, test_timeout=60, |
| + num_retries=options.num_retries) |
| + |
| + report_results.LogFull( |
| + results=results, |
| + test_type='Linker test', |
| + test_package='ContentLinkerTest') |
| + |
| + return exit_code |
| def _RunInstrumentationTests(options, error_func, devices): |
| """Subcommand of RunTestsCommands which runs instrumentation tests.""" |
| @@ -657,6 +678,8 @@ def RunTestsCommand(command, options, args, option_parser): |
| if command == 'gtest': |
| return _RunGTests(options, option_parser.error, devices) |
| + elif command == 'linker': |
| + return _RunLinkerTests(options, option_parser.error, devices) |
| elif command == 'instrumentation': |
| return _RunInstrumentationTests(options, option_parser.error, devices) |
| elif command == 'uiautomator': |
| @@ -725,6 +748,8 @@ VALID_COMMANDS = { |
| AddMonkeyTestOptions, RunTestsCommand), |
| 'perf': CommandFunctionTuple( |
| AddPerfTestOptions, RunTestsCommand), |
| + 'linker': CommandFunctionTuple( |
| + AddLinkerTestOptions, RunTestsCommand), |
| 'help': CommandFunctionTuple(lambda option_parser: None, HelpCommand) |
| } |