summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsin-Yi Chen <hsinyichen@google.com>2024-01-24 18:13:37 +0800
committerHsin-Yi Chen <hsinyichen@google.com>2024-01-25 17:04:15 +0800
commit3b672e13f1128454848afc6bf05b3a13fb7cbb10 (patch)
tree8238f38baf4d4cf3a40fec045097c23fdf0cf0e9
parent14dea2e488e7b769764f8b37eacad36c3f5c74c6 (diff)
downloadvndk-android14-tests-dev.tar.gz
Skip testing 32-bit VNDK on 64-bit only devicesandroid14-tests-dev
Test: atest vts_vndk_abi_test vts_vndk_dependency_test \ vts_vndk_files_test Bug: 321841058 Change-Id: I1cefbd63a8301825fcab823603efa4f5f80c25f6 Merged-In: I1cefbd63a8301825fcab823603efa4f5f80c25f6 (cherry picked from commit 8e0647243a08cd9b5e39e2250341f62d09343100)
-rw-r--r--abi/vts_vndk_abi_test.py10
-rw-r--r--dependency/vts_vndk_dependency_test.py4
-rw-r--r--files/vts_vndk_files_test.py30
3 files changed, 23 insertions, 21 deletions
diff --git a/abi/vts_vndk_abi_test.py b/abi/vts_vndk_abi_test.py
index 386e812..004eb48 100644
--- a/abi/vts_vndk_abi_test.py
+++ b/abi/vts_vndk_abi_test.py
@@ -307,6 +307,10 @@ class VtsVndkAbiTest(unittest.TestCase):
Args:
bitness: 32 or 64, the bitness of the tested libraries.
"""
+ if not self._dut.GetCpuAbiList(bitness):
+ logging.info("Skip the test as the device doesn't support %d-bit "
+ "ABI.", bitness)
+ return
self.assertTrue(self._dut.IsRoot(), "This test requires adb root.")
primary_abi = self._dut.GetCpuAbiList()[0]
binder_bitness = self._dut.GetBinderBitness()
@@ -357,11 +361,7 @@ class VtsVndkAbiTest(unittest.TestCase):
def testAbiCompatibility64(self):
"""Checks ABI compliance of 64-bit VNDK libraries."""
- if self._dut.GetCpuAbiList(64):
- self._TestAbiCompatibility(64)
- else:
- logging.info("Skip the test as the device doesn't support 64-bit "
- "ABI.")
+ self._TestAbiCompatibility(64)
if __name__ == "__main__":
diff --git a/dependency/vts_vndk_dependency_test.py b/dependency/vts_vndk_dependency_test.py
index f11838c..a89c3c3 100644
--- a/dependency/vts_vndk_dependency_test.py
+++ b/dependency/vts_vndk_dependency_test.py
@@ -471,7 +471,9 @@ class VtsVndkDependencyTest(unittest.TestCase):
self._temp_dir, self._TARGET_ROOT_DIR, abi_list,
lambda p, e: read_errors.append((p, str(e))))
- dep_errors = self._TestElfDependency(32, objs)
+ dep_errors = []
+ if self._dut.GetCpuAbiList(32):
+ dep_errors.extend(self._TestElfDependency(32, objs))
if self._dut.GetCpuAbiList(64):
dep_errors.extend(self._TestElfDependency(64, objs))
diff --git a/files/vts_vndk_files_test.py b/files/vts_vndk_files_test.py
index 24f2d82..dce9de2 100644
--- a/files/vts_vndk_files_test.py
+++ b/files/vts_vndk_files_test.py
@@ -126,6 +126,10 @@ class VtsVndkFilesTest(unittest.TestCase):
def _TestVndkCoreDirectory(self, bitness):
"""Verifies that VNDK directory doesn't contain extra files."""
+ if not self._dut.GetCpuAbiList(bitness):
+ logging.info("Skip the test as the device doesn't support %d-bit "
+ "ABI.", bitness)
+ return
if not vndk_utils.IsVndkRuntimeEnforced(self._dut):
logging.info("Skip the test as VNDK runtime is not enforced on "
"the device.")
@@ -145,14 +149,14 @@ class VtsVndkFilesTest(unittest.TestCase):
def testVndkCoreDirectory64(self):
"""Runs _TestVndkCoreDirectory for 64-bit libraries."""
- if self._dut.GetCpuAbiList(64):
- self._TestVndkCoreDirectory(64)
- else:
- logging.info("Skip the test as the device doesn't support 64-bit "
- "ABI.")
+ self._TestVndkCoreDirectory(64)
def _TestNoLlndkInVendor(self, bitness):
"""Verifies that vendor partition has no LL-NDK libraries."""
+ if not self._dut.GetCpuAbiList(bitness):
+ logging.info("Skip the test as the device doesn't support %d-bit "
+ "ABI.", bitness)
+ return
self._TestNotInVndkDirecotory(
vndk_utils.FormatVndkPath(self._TARGET_VENDOR_LIB, bitness),
(vndk_data.LL_NDK,),
@@ -164,14 +168,14 @@ class VtsVndkFilesTest(unittest.TestCase):
def testNoLlndkInVendor64(self):
"""Runs _TestNoLlndkInVendor for 64-bit libraries."""
- if self._dut.GetCpuAbiList(64):
- self._TestNoLlndkInVendor(64)
- else:
- logging.info("Skip the test as the device doesn't support 64-bit "
- "ABI.")
+ self._TestNoLlndkInVendor(64)
def _TestNoLlndkInOdm(self, bitness):
"""Verifies that odm partition has no LL-NDK libraries."""
+ if not self._dut.GetCpuAbiList(bitness):
+ logging.info("Skip the test as the device doesn't support %d-bit "
+ "ABI.", bitness)
+ return
self._TestNotInVndkDirecotory(
vndk_utils.FormatVndkPath(self._TARGET_ODM_LIB, bitness),
(vndk_data.LL_NDK,),
@@ -183,11 +187,7 @@ class VtsVndkFilesTest(unittest.TestCase):
def testNoLlndkInOdm64(self):
"""Runs _TestNoLlndkInOdm for 64-bit libraries."""
- if self._dut.GetCpuAbiList(64):
- self._TestNoLlndkInOdm(64)
- else:
- logging.info("Skip the test as the device doesn't support 64-bit "
- "ABI.")
+ self._TestNoLlndkInOdm(64)
if __name__ == "__main__":