summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsin-Yi Chen <hsinyichen@google.com>2021-06-11 11:15:57 +0800
committerHsin-Yi Chen <hsinyichen@google.com>2021-06-15 12:44:38 +0800
commit7fc510266aa3f6fa12aa45223b41d85b3120576a (patch)
tree0444ed5ba77da72d6c4a4e3ab53b646b26e35c2d
parentccc18234e932f72cc1eeccca59a76db2f9dd4824 (diff)
downloadvndk-7fc510266aa3f6fa12aa45223b41d85b3120576a.tar.gz
Allow dependencies on non-default link paths
The dependency test differentiates default link paths and permitted paths. Vendor objects may depend on libraries in non-default link paths. The test allows the dependencies if the objects have RUNPATHs in vendor or odm partition. Test: atest vts_vndk_dependency_test Bug: 185363536 Change-Id: I7f370677cf535d0bf97e752e72bde1f860970e3a
-rw-r--r--dependency/vts_vndk_dependency_test.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/dependency/vts_vndk_dependency_test.py b/dependency/vts_vndk_dependency_test.py
index ff62885..0c13c41 100644
--- a/dependency/vts_vndk_dependency_test.py
+++ b/dependency/vts_vndk_dependency_test.py
@@ -46,8 +46,12 @@ class VtsVndkDependencyTest(unittest.TestCase):
expected to be in /vendor/lib[64].
_vndk: Set of strings. The names of VNDK-core libraries.
_vndk_sp: Set of strings. The names of VNDK-SP libraries.
- _SP_HAL_LINK_PATHS: Format strings of same-process HAL's link paths.
- _VENDOR_LINK_PATHS: Format strings of vendor processes' link paths.
+ _SP_HAL_LINK_PATHS: Format strings of same-process HAL's default link
+ paths.
+ _VENDOR_LINK_PATHS: Format strings of vendor processes' default link
+ paths.
+ _VENDOR_PERMITTED_PATHS: Same-process HAL and vendor processes'
+ permitted link paths.
_VENDOR_APP_DIRS: The app directories in vendor partitions.
"""
_TARGET_DIR_SEP = "/"
@@ -63,6 +67,9 @@ class VtsVndkDependencyTest(unittest.TestCase):
"/odm/{LIB}/hw", "/odm/{LIB}/egl", "/odm/{LIB}",
"/vendor/{LIB}/hw", "/vendor/{LIB}/egl", "/vendor/{LIB}"
]
+ _VENDOR_PERMITTED_PATHS = [
+ "/odm", "/vendor"
+ ]
_VENDOR_APP_DIRS = [
"/vendor/app", "/vendor/priv-app", "/odm/app", "/odm/priv-app"
]
@@ -366,7 +373,7 @@ class VtsVndkDependencyTest(unittest.TestCase):
vendor_link_paths = [vndk_utils.FormatVndkPath(x, bitness) for
x in self._VENDOR_LINK_PATHS]
vendor_namespace = self._FindLibsInLinkPaths(
- bitness, vendor_link_paths + self._VENDOR_APP_DIRS, objs)
+ bitness, self._VENDOR_PERMITTED_PATHS, objs)
# Exclude VNDK and VNDK-SP extensions from vendor libraries.
for vndk_ext_dir in (vndk_utils.GetVndkExtDirectories(bitness) +
vndk_utils.GetVndkSpExtDirectories(bitness)):
@@ -377,8 +384,8 @@ class VtsVndkDependencyTest(unittest.TestCase):
sp_hal_link_paths = [vndk_utils.FormatVndkPath(x, bitness) for
x in self._SP_HAL_LINK_PATHS]
- sp_hal_namespace = self._FindLibsInLinkPaths(bitness,
- sp_hal_link_paths, objs)
+ sp_hal_namespace = self._FindLibsInLinkPaths(
+ bitness, self._VENDOR_PERMITTED_PATHS, objs)
# Find same-process HAL and dependencies
sp_hal_libs = set()