summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeun Soo Yim <yim@google.com>2018-05-31 17:54:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-31 17:54:23 +0000
commit020d8e00646de4bed84f35182ffec79128aa3436 (patch)
treed2c5ad4c264279f13de2d26e080994c39efdb820
parent6dc2fb77cf15fa7e7fef09ca375ccd1410a78fdc (diff)
parent51ad9872bb9f197bd3330bc095b837c9f51ee7aa (diff)
downloadvndk-020d8e00646de4bed84f35182ffec79128aa3436.tar.gz
Merge "Load ABI dump according to device's binder bitness" into pi-dev
-rw-r--r--abi/VtsVndkAbiTest.py4
-rw-r--r--golden/vndk_data.py10
2 files changed, 11 insertions, 3 deletions
diff --git a/abi/VtsVndkAbiTest.py b/abi/VtsVndkAbiTest.py
index 65bf930..34f8ff5 100644
--- a/abi/VtsVndkAbiTest.py
+++ b/abi/VtsVndkAbiTest.py
@@ -253,6 +253,9 @@ class VtsVndkAbiTest(base_test.BaseTestClass):
def testAbiCompatibility(self):
"""Checks ABI compliance of VNDK libraries."""
primary_abi = self._dut.getCpuAbiList()[0]
+ binder_bitness = self._dut.getBinderBitness()
+ asserts.assertTrue(binder_bitness,
+ "Cannot determine binder bitness.")
dump_version = (self._vndk_version if self._vndk_version else
vndk_data.LoadDefaultVndkVersion(self.data_file_path))
asserts.assertTrue(dump_version,
@@ -261,6 +264,7 @@ class VtsVndkAbiTest(base_test.BaseTestClass):
dump_dir = vndk_data.GetAbiDumpDirectory(
self.data_file_path,
dump_version,
+ binder_bitness,
primary_abi,
self.abi_bitness)
asserts.assertTrue(
diff --git a/golden/vndk_data.py b/golden/vndk_data.py
index e177e0b..014453d 100644
--- a/golden/vndk_data.py
+++ b/golden/vndk_data.py
@@ -68,12 +68,14 @@ def LoadDefaultVndkVersion(data_file_path):
return None
-def GetAbiDumpDirectory(data_file_path, version, abi_name, abi_bitness):
+def GetAbiDumpDirectory(data_file_path, version, binder_bitness, abi_name,
+ abi_bitness):
"""Returns the VNDK dump directory on host.
Args:
data_file_path: The path to VTS data directory.
version: A string, the VNDK version.
+ binder_bitness: A string or an integer, 32 or 64.
abi_name: A string, the ABI of the library dump.
abi_bitness: A string or an integer, 32 or 64.
@@ -92,8 +94,10 @@ def GetAbiDumpDirectory(data_file_path, version, abi_name, abi_bitness):
if not version_dir:
return None
- dump_dir = os.path.join(data_file_path, _GOLDEN_DIR, version_dir, abi_dir,
- "lib64" if str(abi_bitness) == "64" else "lib")
+ dump_dir = os.path.join(
+ data_file_path, _GOLDEN_DIR, version_dir,
+ "binder64" if str(binder_bitness) == "64" else "binder32",
+ abi_dir, "lib64" if str(abi_bitness) == "64" else "lib")
if not os.path.isdir(dump_dir):
logging.warning("%s is not a directory.", dump_dir)