Commit 7a562dc7 authored by Bernhard Bauer's avatar Bernhard Bauer Committed by Commit Bot

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

This reverts commit f3f5b838.

Reason for revert: Breaks official build: https://crbug.com/868258

Original change's description:
> Reland "[ar] Do not refer to ARCore shim in APK merger"
> 
> This is a reland of 58e4a081
> 
> 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}
> 
> Bug: 839191
> Change-Id: I42c3d31c0cbe49c1fe2d68c55d0db18dcdc3381d
> Reviewed-on: https://chromium-review.googlesource.com/1151567
> Reviewed-by: Richard Coles <torne@chromium.org>
> Commit-Queue: Ian Vollick <vollick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#578347}

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

Change-Id: I1383b1330cb21619fe040ed420487fe33003101f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 839191, 868258
Reviewed-on: https://chromium-review.googlesource.com/1152274Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578628}
parent 994934b8
...@@ -37,12 +37,12 @@ BUILD_ANDROID_DIR = os.path.join(SRC_DIR, 'build', 'android') ...@@ -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') BUILD_ANDROID_GYP_DIR = os.path.join(BUILD_ANDROID_DIR, 'gyp')
sys.path.append(BUILD_ANDROID_GYP_DIR) sys.path.append(BUILD_ANDROID_GYP_DIR)
import finalize_apk # pylint: disable=import-error,wrong-import-position import finalize_apk # pylint: disable=import-error
from util import build_utils # pylint: disable=import-error,wrong-import-position from util import build_utils # pylint: disable=import-error
sys.path.append(BUILD_ANDROID_DIR) 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( DEFAULT_ZIPALIGN_PATH = os.path.join(
SRC_DIR, 'third_party', 'android_tools', 'sdk', 'build-tools', SRC_DIR, 'third_party', 'android_tools', 'sdk', 'build-tools',
...@@ -87,7 +87,7 @@ def GetDiffFiles(dcmp, base_dir): ...@@ -87,7 +87,7 @@ def GetDiffFiles(dcmp, base_dir):
copy_files.extend( copy_files.extend(
GetNonDirFiles(os.path.join(dcmp.right, file_name), base_dir)) 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: if len(dcmp.diff_files) > 0:
raise ApkMergeFailure('found differing files: %s in %s and %s' % raise ApkMergeFailure('found differing files: %s in %s and %s' %
(dcmp.diff_files, dcmp.left, dcmp.right)) (dcmp.diff_files, dcmp.left, dcmp.right))
...@@ -117,6 +117,11 @@ def CheckFilesExpected(actual_files, expected_files, component_build): ...@@ -117,6 +117,11 @@ def CheckFilesExpected(actual_files, expected_files, component_build):
duplicate_file_set = set( duplicate_file_set = set(
f for f, n in actual_file_names.iteritems() if n > 1) 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 = [] errors = []
if unexpected_file_set: if unexpected_file_set:
errors.append( errors.append(
...@@ -172,6 +177,10 @@ def MergeApk(args, tmp_apk, tmp_dir_32, tmp_dir_64): ...@@ -172,6 +177,10 @@ def MergeApk(args, tmp_apk, tmp_dir_32, tmp_dir_64):
if args.has_unwind_cfi: if args.has_unwind_cfi:
expected_files['unwind_cfi_32'] = False 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: for f in args.loadable_module_32:
expected_files[f] = not args.uncompress_shared_libraries expected_files[f] = not args.uncompress_shared_libraries
......
...@@ -104,15 +104,12 @@ def MergeTestResults(existing_results_json, additional_results_json): ...@@ -104,15 +104,12 @@ def MergeTestResults(existing_results_json, additional_results_json):
if k not in existing_results_json: if k not in existing_results_json:
existing_results_json[k] = v existing_results_json[k] = v
else: else:
if isinstance(v, dict): if type(v) != type(existing_results_json[k]):
if not isinstance(existing_results_json[k], dict): raise NotImplementedError(
raise NotImplementedError( "Can't merge results field %s of different types" % v)
"Can't merge results field %s of different types" % v) if type(v) is dict:
existing_results_json[k].update(v) existing_results_json[k].update(v)
elif isinstance(v, list): elif type(v) is 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) existing_results_json[k].extend(v)
else: else:
raise NotImplementedError( 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