Add target gtest dependencies to build-art-target-tests.
Now that we're not using makefile for syncing, we've lost
that dependency.
Test: test-art-target-gtest
Change-Id: If0e4c9e332c34b5ceb1667945cc5c1a8eedc8768
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index c6fdf27..4badc5a 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -404,6 +404,7 @@
ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
ART_TEST_TARGET_GTEST_RULES :=
ART_TEST_HOST_GTEST_DEPENDENCIES :=
+ART_TEST_TARGET_GTEST_DEPENDENCIES :=
ART_GTEST_TARGET_ANDROID_ROOT := '/system'
ifneq ($(ART_TEST_ANDROID_ROOT),)
@@ -432,7 +433,7 @@
# Add the test dependencies to test-art-target-sync, which will be a prerequisite for the test
# to ensure files are pushed to the device.
- TEST_ART_TARGET_SYNC_DEPS += \
+ gtest_deps := \
$$(ART_GTEST_$(1)_TARGET_DEPS) \
$(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
$$(gtest_exe) \
@@ -442,6 +443,8 @@
$$(TARGET_OUT_JAVA_LIBRARIES)/core-oj-testdex.jar \
$$(TARGET_OUT_JAVA_LIBRARIES)/core-simple-testdex.jar
+ ART_TEST_TARGET_GTEST_DEPENDENCIES += $$(gtest_deps)
+
$$(gtest_rule): PRIVATE_TARGET_EXE := $$(gtest_target_exe)
$$(gtest_rule): PRIVATE_MAYBE_CHROOT_COMMAND := $$(maybe_chroot_command)
@@ -473,6 +476,7 @@
maybe_chroot_command :=
maybe_art_test_chroot :=
gtest_target_exe :=
+ gtest_deps :=
gtest_exe :=
gtest_rule :=
endef # define-art-gtest-rule-target