Remove build variant "tests"
Bug: 5368571
Now we have a phony target "tests" instead.
The target can be built in any other build variant (eg userdebug).
For example, "make PRODUCT-full-userdebug tests dist" will build and
put the *-test-* zip file in the dist dir.
The "tests" target will include all modules tagged as "tests" in
addition to other modules in specific target out directories.
Change-Id: I8383097380d8e6846c3e2107d6dd5f68788cfc39
diff --git a/core/product_config.mk b/core/product_config.mk
index e05907d..bfbdf78 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -82,7 +82,7 @@
# These are the valid values of TARGET_BUILD_VARIANT. Also, if anything else is passed
# as the variant in the PRODUCT-$TARGET_BUILD_PRODUCT-$TARGET_BUILD_VARIANT form,
# it will be treated as a goal, and the eng variant will be used.
-INTERNAL_VALID_VARIANTS := user userdebug eng tests
+INTERNAL_VALID_VARIANTS := user userdebug eng
# ---------------------------------------------------------------
# Provide "PRODUCT-<prodname>-<goal>" targets, which lets you build
@@ -109,6 +109,10 @@
# The variant they want
TARGET_BUILD_VARIANT := $(word 2,$(product_goals))
+ ifeq ($(TARGET_BUILD_VARIANT),tests)
+ $(error "tests" has been deprecated as a build variant. Use it as a build goal instead.)
+ endif
+
# The build server wants to do make PRODUCT-dream-installclean
# which really means TARGET_PRODUCT=dream make installclean.
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
@@ -119,11 +123,6 @@
default_goal_substitution := $(DEFAULT_GOAL)
endif
- # For tests build, only build tests-build-target
- ifeq (tests,$(TARGET_BUILD_VARIANT))
- default_goal_substitution := tests-build-target
- endif
-
# Replace the PRODUCT-* goal with the build goal that it refers to.
# Note that this will ensure that it appears in the same relative
# position, in case it matters.