From 51ad9872bb9f197bd3330bc095b837c9f51ee7aa Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Tue, 29 May 2018 18:09:14 +0800 Subject: Load ABI dump according to device's binder bitness Bug: 79659992 Test: run vts -m VtsVndkAbi Change-Id: I9af6e9334c8663694737fb9bf88af600906e2bc9 --- abi/VtsVndkAbiTest.py | 4 ++++ golden/vndk_data.py | 10 +++++++--- 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) -- cgit v1.2.3