Commit 58e4a081 authored by Ian Vollick's avatar Ian Vollick Committed by Commit Bot

[ar] Do not refer to ARCore shim in APK merger

This hard-coding should no longer be required.

Bug: 839191
Change-Id: Id44f0f19da6efcee90ef79ea3e241eb2a7ea5843
Reviewed-on: https://chromium-review.googlesource.com/1147706
Commit-Queue: Ian Vollick <vollick@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577662}
parent 17d5ec7d
......@@ -37,12 +37,12 @@ BUILD_ANDROID_DIR = os.path.join(SRC_DIR, 'build', 'android')
BUILD_ANDROID_GYP_DIR = os.path.join(BUILD_ANDROID_DIR, 'gyp')
sys.path.append(BUILD_ANDROID_GYP_DIR)
import finalize_apk # pylint: disable=import-error
from util import build_utils # pylint: disable=import-error
import finalize_apk # pylint: disable=import-error,wrong-import-position
from util import build_utils # pylint: disable=import-error,wrong-import-position
sys.path.append(BUILD_ANDROID_DIR)
from pylib import constants # pylint: disable=import-error
from pylib import constants # pylint: disable=import-error,wrong-import-position
DEFAULT_ZIPALIGN_PATH = os.path.join(
SRC_DIR, 'third_party', 'android_tools', 'sdk', 'build-tools',
......@@ -87,7 +87,7 @@ def GetDiffFiles(dcmp, base_dir):
copy_files.extend(
GetNonDirFiles(os.path.join(dcmp.right, file_name), base_dir))
# we cannot merge APKs with files with similar names but different contents
# we cannot merge APKs with files with similar names but different contents
if len(dcmp.diff_files) > 0:
raise ApkMergeFailure('found differing files: %s in %s and %s' %
(dcmp.diff_files, dcmp.left, dcmp.right))
......@@ -117,11 +117,6 @@ def CheckFilesExpected(actual_files, expected_files, component_build):
duplicate_file_set = set(
f for f, n in actual_file_names.iteritems() if n > 1)
# TODO(crbug.com/839191): Remove this once we're plumbing the lib correctly.
missing_file_set = set(
f for f in missing_file_set if not os.path.basename(f) ==
'libarcore_sdk_c_minimal.so')
errors = []
if unexpected_file_set:
errors.append(
......@@ -177,10 +172,6 @@ def MergeApk(args, tmp_apk, tmp_dir_32, tmp_dir_64):
if args.has_unwind_cfi:
expected_files['unwind_cfi_32'] = False
# TODO(crbug.com/839191): we should pass this in via script arguments.
if not args.loadable_module_32:
args.loadable_module_32.append('libarcore_sdk_c_minimal.so')
for f in args.loadable_module_32:
expected_files[f] = not args.uncompress_shared_libraries
......
......@@ -104,12 +104,15 @@ def MergeTestResults(existing_results_json, additional_results_json):
if k not in existing_results_json:
existing_results_json[k] = v
else:
if type(v) != type(existing_results_json[k]):
raise NotImplementedError(
"Can't merge results field %s of different types" % v)
if type(v) is dict:
if isinstance(v, dict):
if not isinstance(existing_results_json[k], dict):
raise NotImplementedError(
"Can't merge results field %s of different types" % v)
existing_results_json[k].update(v)
elif type(v) is list:
elif isinstance(v, list):
if not isinstance(existing_results_json[k], list):
raise NotImplementedError(
"Can't merge results field %s of different types" % v)
existing_results_json[k].extend(v)
else:
raise NotImplementedError(
......
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