Commit cae691f4 authored by Ian Vollick's avatar Ian Vollick Committed by Commit Bot

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

This reverts commit 58e4a081.

Reason for revert: appears to be still required.

Original change's description:
> [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: Richard Coles <torne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#577662}

TBR=vollick@chromium.org,torne@chromium.org

Change-Id: Ia4e5bd3908b40e5cbcff058230cad20542c57a31
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 839191
Reviewed-on: https://chromium-review.googlesource.com/1150120Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
Commit-Queue: Ian Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577845}
parent 7a964130
......@@ -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,wrong-import-position
from util import build_utils # pylint: disable=import-error,wrong-import-position
import finalize_apk # pylint: disable=import-error
from util import build_utils # pylint: disable=import-error
sys.path.append(BUILD_ANDROID_DIR)
from pylib import constants # pylint: disable=import-error,wrong-import-position
from pylib import constants # pylint: disable=import-error
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,6 +117,11 @@ 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(
......@@ -172,6 +177,10 @@ 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,15 +104,12 @@ def MergeTestResults(existing_results_json, additional_results_json):
if k not in existing_results_json:
existing_results_json[k] = v
else:
if isinstance(v, dict):
if not isinstance(existing_results_json[k], dict):
raise NotImplementedError(
"Can't merge results field %s of different types" % v)
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:
existing_results_json[k].update(v)
elif isinstance(v, list):
if not isinstance(existing_results_json[k], list):
raise NotImplementedError(
"Can't merge results field %s of different types" % v)
elif type(v) is list:
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