Skip to content

Commit

Permalink
[Android] Switch instrumentation tests to platform mode.
Browse files Browse the repository at this point in the history
BUG=428729

Review URL: https://codereview.chromium.org/1387933005

Cr-Commit-Position: refs/heads/master@{#377324}
  • Loading branch information
jbudorick authored and Commit bot committed Feb 24, 2016
1 parent 2639811 commit e564833
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 2 additions & 6 deletions build/android/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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':
Expand Down

0 comments on commit e564833

Please sign in to comment.