| Index: build/android/test_runner.py
|
| diff --git a/build/android/test_runner.py b/build/android/test_runner.py
|
| index 08a0be33ada010a99c2a48c4173f7c0adaf9bac6..f93b916265ee88e1451040c6727a91f6c115bfa0 100755
|
| --- a/build/android/test_runner.py
|
| +++ b/build/android/test_runner.py
|
| @@ -21,10 +21,11 @@ from pylib import ports
|
| from pylib.base import base_test_result
|
| from pylib.browsertests import dispatch as browsertests_dispatch
|
| from pylib.gtest import dispatch as gtest_dispatch
|
| -from pylib.host_driven import run_python_tests as python_dispatch
|
| +from pylib.host_driven import run_python_tests as host_driven_dispatch
|
| from pylib.instrumentation import dispatch as instrumentation_dispatch
|
| from pylib.uiautomator import dispatch as uiautomator_dispatch
|
| -from pylib.utils import emulator, report_results, run_tests_helper
|
| +from pylib.utils import report_results
|
| +from pylib.utils import run_tests_helper
|
|
|
|
|
| _SDK_OUT_DIR = os.path.join(constants.DIR_SOURCE_ROOT, 'out')
|
| @@ -45,28 +46,6 @@ def AddBuildTypeOption(option_parser):
|
| ' Default is env var BUILDTYPE or Debug.'))
|
|
|
|
|
| -def AddEmulatorOptions(option_parser):
|
| - """Adds all emulator-related options to |option_parser|."""
|
| -
|
| - # TODO(gkanwar): Figure out what we're doing with the emulator setup
|
| - # and determine whether these options should be deprecated/removed.
|
| - option_parser.add_option('-e', '--emulator', dest='use_emulator',
|
| - action='store_true',
|
| - help='Run tests in a new instance of emulator.')
|
| - option_parser.add_option('-n', '--emulator-count',
|
| - type='int', default=1,
|
| - help=('Number of emulators to launch for '
|
| - 'running the tests.'))
|
| - option_parser.add_option('--abi', default='armeabi-v7a',
|
| - help='Platform of emulators to launch.')
|
| -
|
| -
|
| -def ProcessEmulatorOptions(options):
|
| - """Processes emulator options."""
|
| - if options.use_emulator:
|
| - emulator.DeleteAllTempAVDs()
|
| -
|
| -
|
| def AddCommonOptions(option_parser):
|
| """Adds all common options to |option_parser|."""
|
|
|
| @@ -129,11 +108,6 @@ def AddCoreGTestOptions(option_parser, default_timeout=60):
|
| help='Filter GTests by name.')
|
| option_parser.add_option('-a', '--test_arguments', dest='test_arguments',
|
| help='Additional arguments to pass to the test.')
|
| - # TODO(gkanwar): Most likely deprecate/remove this option once we've pinned
|
| - # down what we're doing with the emulator setup.
|
| - option_parser.add_option('-x', '--xvfb', dest='use_xvfb',
|
| - action='store_true',
|
| - help='Use Xvfb around tests (ignored if not Linux).')
|
| # TODO(gkanwar): Possible deprecate this flag. Waiting on word from Peter
|
| # Beverloo.
|
| option_parser.add_option('--webkit', action='store_true',
|
| @@ -171,7 +145,6 @@ def AddGTestOptions(option_parser):
|
| AddCoreGTestOptions(option_parser)
|
| # TODO(gkanwar): Move these to Common Options once we have the plumbing
|
| # in our other test types to handle these commands
|
| - AddEmulatorOptions(option_parser)
|
| AddCommonOptions(option_parser)
|
|
|
|
|
| @@ -372,22 +345,20 @@ def RunTestsCommand(command, options, args, option_parser):
|
| ProcessCommonOptions(options)
|
|
|
| if command == 'gtest':
|
| - # TODO(gkanwar): See the emulator TODO above -- this call should either go
|
| - # away or become generalized.
|
| - ProcessEmulatorOptions(options)
|
| - results, exit_code = gtest_dispatch.Dispatch(options)
|
| + results, exit_code = gtest_dispatch.RunGTests(options)
|
| elif command == 'content_browsertests':
|
| - results, exit_code = browsertests_dispatch.Dispatch(options)
|
| + results, exit_code = browsertests_dispatch.RunContentBrowserTests(options)
|
| elif command == 'instrumentation':
|
| ProcessInstrumentationOptions(options, option_parser.error)
|
| results = base_test_result.TestRunResults()
|
| exit_code = 0
|
| if options.run_java_tests:
|
| - test_results, exit_code = instrumentation_dispatch.Dispatch(options)
|
| + test_results, exit_code = (instrumentation_dispatch.
|
| + RunInstrumentationTests(options))
|
| results.AddTestRunResults(test_results)
|
| if options.run_python_tests:
|
| - test_results, test_exit_code = (python_dispatch.
|
| - DispatchPythonTests(options))
|
| + test_results, test_exit_code = (host_driven_dispatch.
|
| + RunHostDrivenTests(options))
|
| results.AddTestRunResults(test_results)
|
| # Only allow exit code escalation
|
| if test_exit_code and exit_code != constants.ERROR_EXIT_CODE:
|
| @@ -404,11 +375,12 @@ def RunTestsCommand(command, options, args, option_parser):
|
| results = base_test_result.TestRunResults()
|
| exit_code = 0
|
| if options.run_java_tests:
|
| - test_results, exit_code = uiautomator_dispatch.Dispatch(options)
|
| + test_results, exit_code = (uiautomator_dispatch.
|
| + RunUIAutomatorTests(options))
|
| results.AddTestRunResults(test_results)
|
| if options.run_python_tests:
|
| - test_results, test_exit_code = (python_dispatch.
|
| - DispatchPythonTests(options))
|
| + test_results, test_exit_code = (host_driven_dispatch.
|
| + RunHostDrivenTests(options))
|
| results.AddTestRunResults(test_results)
|
| # Only allow exit code escalation
|
| if test_exit_code and exit_code != constants.ERROR_EXIT_CODE:
|
|
|