diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-03-29 11:50:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-29 11:50:55 +0000 |
commit | a1bb522ee2c09d9c12bbda5bb8326a099bbd6b42 (patch) | |
tree | b8c501929cfc4de3fa218835398f26364a46e954 | |
parent | 1af115af52ad9be1a13fd0311e12000fd509f074 (diff) | |
parent | c04b6cf97fbf0005aecd942e64a208768dbc52d2 (diff) | |
download | apex-a1bb522ee2c09d9c12bbda5bb8326a099bbd6b42.tar.gz |
Merge "Don't test bar_test32 on 64-bit only targets" into main
-rw-r--r-- | tests/src/com/android/tests/apex/SharedLibsApexTest.java | 72 |
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"); |