Commit c143cf3c authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Exclude more files from being pushed to device

Bug: 831388
Change-Id: If885e2205c1f120e0f718522bdfc7de03e125eab
Reviewed-on: https://chromium-review.googlesource.com/1006180Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552119}
parent 0b3868aa
......@@ -23,12 +23,25 @@ _BLACKLIST = [
# Exists just to test the compile, not to be run.
re.compile(r'.*jni_generator_tests'),
# v8's blobs get packaged into APKs.
# v8's blobs and icu data get packaged into APKs.
re.compile(r'.*natives_blob.*\.bin'),
re.compile(r'.*snapshot_blob.*\.bin'),
re.compile(r'.*icudtl.bin'),
# Scripts that are needed by swarming, but not on devices:
re.compile(r'.*llvm-symbolizer'),
re.compile(r'.*md5sum_bin'),
re.compile(os.path.join('.*', 'development', 'scripts', 'stack')),
]
def _FilterDataDeps(abs_host_files):
blacklist = _BLACKLIST + [
re.compile(os.path.join(constants.GetOutDirectory(), 'bin'))]
return [p for p in abs_host_files
if not any(r.match(p) for r in blacklist)]
def DevicePathComponentsFor(host_path, output_directory):
"""Returns the device path components for a given host path.
......@@ -96,9 +109,7 @@ def GetDataDependencies(runtime_deps_path):
abs_host_files = [
os.path.abspath(os.path.join(output_directory, r))
for r in rel_host_files]
filtered_abs_host_files = [
host_file for host_file in abs_host_files
if not any(blacklist_re.match(host_file) for blacklist_re in _BLACKLIST)]
filtered_abs_host_files = _FilterDataDeps(abs_host_files)
# TODO(crbug.com/752610): Filter out host executables, and investigate
# whether other files could be filtered as well.
return [(f, DevicePathComponentsFor(f, output_directory))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment