summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsin-Yi Chen <hsinyichen@google.com>2018-04-09 18:31:50 +0800
committerHsin-Yi Chen <hsinyichen@google.com>2018-04-09 11:13:03 +0000
commit4825b7913469289fc0fde134e48a32ce9f289b9e (patch)
treedf7ab35d60e9d5e9ebfcb793bd70d72f4a6ceb22
parent67ea777bddebc4718200b9a3a3e6d1bb8d0dc6b2 (diff)
downloadvndk-oreo-mr1-vts-dev.tar.gz
Use versioned VNDK directory in vts-vndkoreo-mr1-vts-dev
If the device has the property of ro.vndk.version, VtsVndkDependency loads VNDK-SP library names from /system/{LIB}/vndk-sp{VER}. Bug: 77680169 Test: vts-tradefed run commandAndExit vts-vndk Change-Id: Ia5b5d7b5bd14d7d2c8fe7da0e5466698627e2b84 Merged-In: I9bfb8e8a970f030ec93364cbe511b03bdfca2f29
-rw-r--r--dependency/VtsVndkDependencyTest.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/dependency/VtsVndkDependencyTest.py b/dependency/VtsVndkDependencyTest.py
index 4ccea2a..8a35dee 100644
--- a/dependency/VtsVndkDependencyTest.py
+++ b/dependency/VtsVndkDependencyTest.py
@@ -29,6 +29,7 @@ from vts.utils.python.controllers import android_device
from vts.utils.python.file import target_file_utils
from vts.utils.python.library import elf_parser
from vts.utils.python.os import path_utils
+from vts.utils.python.vndk import vndk_utils
class VtsVndkDependencyTest(base_test.BaseTestClass):
@@ -47,8 +48,6 @@ class VtsVndkDependencyTest(base_test.BaseTestClass):
libraries in /system/lib[64].
"""
_TARGET_VENDOR_DIR = "/vendor"
- _TARGET_VNDK_SP_DIR_32 = "/system/lib/vndk-sp"
- _TARGET_VNDK_SP_DIR_64 = "/system/lib64/vndk-sp"
# copied from development/vndk/tools/definition-tool/vndk_definition_tool.py
_LOW_LEVEL_NDK = [
@@ -172,10 +171,6 @@ class VtsVndkDependencyTest(base_test.BaseTestClass):
return True
return False
- def _getTargetVndkSpDir(self, bitness):
- """Returns 32/64-bit vndk-sp directory path on target device."""
- return getattr(self, "_TARGET_VNDK_SP_DIR_" + str(bitness))
-
def _getSpHalLinkPaths(self, bitness):
"""Returns 32/64-bit same-process HAL link paths"""
return getattr(self, "_SP_HAL_LINK_PATHS_" + str(bitness))
@@ -236,7 +231,8 @@ class VtsVndkDependencyTest(base_test.BaseTestClass):
List of tuples (path, dependency_names). The library with
disallowed dependencies and list of the dependencies.
"""
- vndk_sp_dir = self._getTargetVndkSpDir(bitness)
+ vndk_sp_dir = vndk_utils.GetVndkSpDirectory(bitness,
+ self._dut.vndk_version)
vndk_sp_paths = target_file_utils.FindFiles(self._shell, vndk_sp_dir,
"*.so")
vndk_sp_names = set(