summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2024-03-29 09:53:51 +0900
committerJiyong Park <jiyong@google.com>2024-03-29 09:53:51 +0900
commitc04b6cf97fbf0005aecd942e64a208768dbc52d2 (patch)
tree8900dd6c2b8c1a95e635bfc2e3ea81b6eb65d8af
parent1e795f03b2bd5cfafe4038a4a4c4d3cd93913e9a (diff)
downloadapex-c04b6cf97fbf0005aecd942e64a208768dbc52d2.tar.gz
Don't test bar_test32 on 64-bit only targets
Bug: 331089409 Test: run the test on aosp_cf_x86_64_only_phone-trunk_staging-userdebug Change-Id: Id0fce1fa3bbff44a68788e8225181ba4da9af27c
-rw-r--r--tests/src/com/android/tests/apex/SharedLibsApexTest.java72
1 files changed, 45 insertions, 27 deletions
diff --git a/tests/src/com/android/tests/apex/SharedLibsApexTest.java b/tests/src/com/android/tests/apex/SharedLibsApexTest.java
index df49f62f..797a71b1 100644
--- a/tests/src/com/android/tests/apex/SharedLibsApexTest.java
+++ b/tests/src/com/android/tests/apex/SharedLibsApexTest.java
@@ -195,9 +195,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
String runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -220,9 +222,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_2 SHARED_LIB_VERSION_Y");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -267,9 +271,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
String runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -308,9 +314,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -350,9 +358,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_2 SHARED_LIB_VERSION_Y");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -386,9 +396,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_2 SHARED_LIB_VERSION_Y");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -430,9 +442,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
String runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -465,9 +479,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_1 SHARED_LIB_VERSION_X");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_1 SHARED_LIB_VERSION_X");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");
@@ -524,9 +540,11 @@ public class SharedLibsApexTest extends BaseHostJUnit4Test {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.foo/bin/foo_test");
assertThat(runAsResult).isEqualTo("FOO_VERSION_2 SHARED_LIB_VERSION_Y");
- runAsResult = getDevice().executeShellCommand(
- "/apex/com.android.apex.test.bar/bin/bar_test32");
- assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ if (CpuFeatures.isX86_32(getDevice()) || CpuFeatures.isArm32(getDevice())) {
+ runAsResult = getDevice().executeShellCommand(
+ "/apex/com.android.apex.test.bar/bin/bar_test32");
+ assertThat(runAsResult).isEqualTo("BAR_VERSION_2 SHARED_LIB_VERSION_Y");
+ }
if (CpuFeatures.isX86_64(getDevice()) || CpuFeatures.isArm64(getDevice())) {
runAsResult = getDevice().executeShellCommand(
"/apex/com.android.apex.test.bar/bin/bar_test64");