Fix various test dependencies.
Change-Id: I2e4761f4cc061f74319a7b64ebe67c553d5297df
diff --git a/test/Android.oat.mk b/test/Android.oat.mk
index 6e43ab6..4e4f62c 100644
--- a/test/Android.oat.mk
+++ b/test/Android.oat.mk
@@ -163,9 +163,14 @@
# All tests require the host executables, libarttest and the core images.
ART_TEST_HOST_OAT_DEPENDENCIES := \
$(ART_HOST_EXECUTABLES) \
- $(HOST_LIBRARY_PATH)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
- $(HOST_CORE_IMG_OUT) \
+ $(ART_HOST_LIBRARY_PATH)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
+ $(HOST_CORE_IMG_OUT)
+
+ifneq ($(HOST_PREFER_32_BIT),true)
+ART_TEST_HOST_OAT_DEPENDENCIES += \
+ $(2ND_ART_HOST_LIBRARY_PATH)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
$(2ND_HOST_CORE_IMG_OUT)
+endif
# Define rule to run an individual oat test on the host. Output from the test is written to the
# host in /tmp/android-data in a directory named after test's rule name (its target) and the parent
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index add97be..d359fb0 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -109,7 +109,13 @@
ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
$(ART_HOST_EXECUTABLES) \
$(HOST_CORE_IMG_OUT) \
+ $(ART_HOST_LIBRARY_PATH)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
+
+ifneq ($(HOST_PREFER_32_BIT),true)
+ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
+ $(2ND_ART_HOST_LIBRARY_PATH)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
$(2ND_HOST_CORE_IMG_OUT)
+endif
# For a given test create all the combinations of host/target, compiler and suffix such as:
# test-art-host-run-test-optimizing-003-omnibus-opcodes32