Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1372)

Unified Diff: build/android/test_runner.py

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/symbolize.py ('k') | build/android/tests/multiple_proguards/src/dummy/DummyActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index d5c9b3597cebddbc87a4363b623f06f5c2006613..b483d2b29e00444d4742ca5a6184963fc8ff7c55 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -91,6 +91,9 @@ def AddCommonOptions(option_parser):
group.add_option('-e', '--environment', default='local',
help=('Test environment to run in. Must be one of: %s' %
', '.join(constants.VALID_ENVIRONMENTS)))
+ group.add_option('--adb-path',
+ help=('Specify the absolute path of the adb binary that '
+ 'should be used.'))
option_parser.add_option_group(group)
@@ -102,6 +105,12 @@ def ProcessCommonOptions(options, error_func):
constants.SetBuildDirectory(options.build_directory)
if options.output_directory:
constants.SetOutputDirectort(options.output_directory)
+ if options.adb_path:
+ constants.SetAdbPath(options.adb_path)
+ # Some things such as Forwarder require ADB to be in the environment path.
+ adb_dir = os.path.dirname(constants.GetAdbPath())
+ if adb_dir and adb_dir not in os.environ['PATH'].split(os.pathsep):
+ os.environ['PATH'] = adb_dir + os.pathsep + os.environ['PATH']
if options.environment not in constants.VALID_ENVIRONMENTS:
error_func('--environment must be one of: %s' %
', '.join(constants.VALID_ENVIRONMENTS))
@@ -272,6 +281,11 @@ def AddInstrumentationTestOptions(option_parser):
option_parser.add_option('--device-flags', dest='device_flags', default='',
help='The relative filepath to a file containing '
'command-line flags to set on the device')
+ option_parser.add_option('--isolate_file_path',
+ '--isolate-file-path',
+ dest='isolate_file_path',
+ help='.isolate file path to override the default '
+ 'path')
def ProcessInstrumentationOptions(options, error_func):
@@ -334,7 +348,8 @@ def ProcessInstrumentationOptions(options, error_func):
options.test_apk_jar_path,
options.test_runner,
options.test_support_apk_path,
- options.device_flags
+ options.device_flags,
+ options.isolate_file_path
)
@@ -657,7 +672,8 @@ def _RunInstrumentationTests(options, error_func, devices):
exit_code = 0
if options.run_java_tests:
- runner_factory, tests = instrumentation_setup.Setup(instrumentation_options)
+ runner_factory, tests = instrumentation_setup.Setup(
+ instrumentation_options, devices)
test_results, exit_code = test_dispatcher.RunTests(
tests, runner_factory, devices, shard=True, test_timeout=None,
« no previous file with comments | « build/android/symbolize.py ('k') | build/android/tests/multiple_proguards/src/dummy/DummyActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698