summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-09-26 15:31:20 -0700
committerIan Rogers <irogers@google.com>2014-09-26 15:31:20 -0700
commit8f0bbd235c30c99f16e10100036537dd0c0080b5 (patch)
tree7deee7a670b56507fdb9b47f8415a59adcae672d /Android.mk
parent7fe50c6239e298a9ff7918dbc73d9eeb6666a7dc (diff)
downloadart-8f0bbd235c30c99f16e10100036537dd0c0080b5.zip
art-8f0bbd235c30c99f16e10100036537dd0c0080b5.tar.gz
art-8f0bbd235c30c99f16e10100036537dd0c0080b5.tar.bz2
Only include test targets if test-art* or build-art* is being built.
Change-Id: I229ba2a77d993b2c14acf9a76e102ef76b0aeba6
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk26
1 files changed, 18 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk
index f8d46a4..7d36659 100644
--- a/Android.mk
+++ b/Android.mk
@@ -24,15 +24,17 @@ art_path := $(LOCAL_PATH)
include $(art_path)/build/Android.common_path.mk
-# following the example of build's dont_bother for clean targets
-ifneq (,$(filter clean-oat,$(MAKECMDGOALS)))
-art_dont_bother := true
+# Following the example of build's dont_bother for clean targets.
+art_done_bother := false
+ifneq (,$(filter clean-oat%,$(MAKECMDGOALS)))
+ art_dont_bother := true
endif
-ifneq (,$(filter clean-oat-host,$(MAKECMDGOALS)))
-art_dont_bother := true
-endif
-ifneq (,$(filter clean-oat-target,$(MAKECMDGOALS)))
-art_dont_bother := true
+
+# Don't bother with tests unless there is a test-art* or build-art* target.
+art_test_bother := false
+$(info $(MAKECMDGOALS))
+ifneq (,$(filter test-art% build-art%,$(MAKECMDGOALS)))
+ art_test_bother := true
endif
.PHONY: clean-oat
@@ -131,6 +133,8 @@ endif
########################################################################
# test rules
+ifeq ($(art_test_bother),true)
+
# All the dependencies that must be built ahead of sync-ing them onto the target device.
TEST_ART_TARGET_SYNC_DEPS :=
@@ -300,6 +304,8 @@ test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-
$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
endif
+endif # art_test_bother
+
########################################################################
# oat-target and oat-target-sync rules
@@ -452,3 +458,7 @@ use-art-verify-none:
########################################################################
endif # !art_dont_bother
+
+# Clear locally used variables.
+art_dont_bother :=
+art_test_bother :=