diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py index 613b778d1fab4a..62d64b140222b6 100644 --- a/build/android/pylib/instrumentation/instrumentation_test_instance.py +++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py @@ -290,7 +290,11 @@ def _initializeApkAttributes(self, args, error_func): def _initializeDataDependencyAttributes(self, args, isolate_delegate): self._data_deps = [] if args.isolate_file_path: - self._isolate_abs_path = os.path.abspath(args.isolate_file_path) + if os.path.isabs(args.isolate_file_path): + self._isolate_abs_path = args.isolate_file_path + else: + self._isolate_abs_path = os.path.join( + constants.DIR_SOURCE_ROOT, args.isolate_file_path) self._isolate_delegate = isolate_delegate self._isolated_abs_path = os.path.join( constants.GetOutDirectory(), '%s.isolated' % self._test_package) @@ -340,7 +344,7 @@ def annotation_dict_element(a): }) def _initializeFlagAttributes(self, args): - self._flags = ['--disable-fre', '--enable-test-intents'] + self._flags = ['--enable-test-intents'] # TODO(jbudorick): Transition "--device-flags" to "--device-flags-file" if hasattr(args, 'device_flags') and args.device_flags: with open(args.device_flags) as device_flags_file: diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py index 9298d756fc0219..e588202730f00f 100644 --- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py +++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py @@ -54,7 +54,7 @@ def __init__(self, env, test_instance): self._flag_changers = {} def TestPackage(self): - return None + return self._test_instance.suite def SetUp(self): def substitute_external_storage(d, external_storage): diff --git a/build/android/test_runner.py b/build/android/test_runner.py index ca6fe419429b59..cf30b457179392 100755 --- a/build/android/test_runner.py +++ b/build/android/test_runner.py @@ -975,7 +975,7 @@ def RunTestsCommand(args): # pylint: disable=too-many-return-statements ProcessCommonOptions(args) logging.info('command: %s', ' '.join(sys.argv)) - if args.enable_platform_mode: + if args.enable_platform_mode or command in ('gtest', 'instrumentation'): return RunTestsInPlatformMode(args) forwarder.Forwarder.RemoveHostLog() @@ -986,12 +986,8 @@ def get_devices(): return _GetAttachedDevices(args.blacklist_file, args.test_device, args.enable_device_cache) - if command == 'gtest': - return RunTestsInPlatformMode(args) - elif command == 'linker': + if command == 'linker': return _RunLinkerTests(args, get_devices()) - elif command == 'instrumentation': - return _RunInstrumentationTests(args, get_devices()) elif command == 'junit': return _RunJUnitTests(args) elif command == 'monkey':