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/Makefile b/core/Makefile
index 69bedf7..3828f53 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1214,6 +1214,7 @@
endif # TARGET_DEVICE != generic*
endif # TARGET_PRODUCT != sdk
+ifdef is_tests_build
# -----------------------------------------------------------------
# A zip of the tests that are built when running "make tests".
# This is very similar to BUILT_TARGET_FILES_PACKAGE, but we
@@ -1244,23 +1245,13 @@
$(TARGET_OUT_DATA),$(zip_root)/DATA)
$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
-.PHONY: tests-zip-package
-tests-zip-package: $(BUILT_TESTS_ZIP_PACKAGE)
-
-# Target needed by tests build
-.PHONY: tests-build-target
-tests-build-target: $(BUILT_TESTS_ZIP_PACKAGE)
-
-ifneq (,$(filter $(MAKECMDGOALS),tests-build-target))
- $(call dist-for-goals, tests-build-target, \
- $(BUILT_TESTS_ZIP_PACKAGE))
-endif
-
.PHONY: tests
tests: $(BUILT_TESTS_ZIP_PACKAGE)
+
ifneq (,$(filter tests, $(MAKECMDGOALS)))
-$(call dist-for-goals, tests, $(BUILT_TESTS_ZIP_PACKAGE))
+ $(call dist-for-goals, tests, $(BUILT_TESTS_ZIP_PACKAGE))
endif
+endif # is_tests_build
# -----------------------------------------------------------------
# A zip of the symbols directory. Keep the full paths to make it