Change "make PRODUCT-XXX-tests" to build only tests-build-target

Change-Id: Ib1a1a7b09ea6f1c3eea84394dcd6e3ebcda81e1a
This commit is contained in:
Ying Wang 2010-09-14 16:07:56 -07:00
parent 32afccc732
commit db2cb63612
3 changed files with 14 additions and 19 deletions

View file

@ -831,8 +831,6 @@ $(INSTALLED_USERDATAIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) \
.PHONY: userdataimage-nodeps
userdataimage-nodeps: $(INTERNAL_USERIMAGES_DEPS)
$(build-userdataimage-target)
$(hide)mkdir -p $(DIST_DIR)
$(hide)cp $(INSTALLED_USERDATAIMAGE_TARGET) $(DIST_DIR)
#######
## data partition tarball
@ -1106,12 +1104,15 @@ $(BUILT_TESTS_ZIP_PACKAGE): \
.PHONY: tests-zip-package
tests-zip-package: $(BUILT_TESTS_ZIP_PACKAGE)
# Dist the files needed by tests builds
# So the build server can run the following commands to build tests packages while avoid a full build:
# $make -j16 tests-zip-package userdataimage-nodeps dist showcommands TARGET_BUILD_VARIANT=tests TARGET_PRODUCT=passion
ifeq ($(filter $(DEFAULT_GOAL) tests-zip-package,$(MAKECMDGOALS)),tests-zip-package)
$(call dist-for-goals, tests-zip-package, \
$(BUILT_TESTS_ZIP_PACKAGE))
# Target needed by tests build
.PHONY: tests-build-target
tests-build-target: $(BUILT_TESTS_ZIP_PACKAGE) \
$(BUILT_USERDATAIMAGE_TARGET)
ifneq (,$(filter $(MAKECMDGOALS),tests-build-target))
$(call dist-for-goals, tests-build-target, \
$(BUILT_TESTS_ZIP_PACKAGE) \
$(BUILT_USERDATAIMAGE_TARGET))
endif
# -----------------------------------------------------------------

View file

@ -741,17 +741,6 @@ else # TARGET_BUILD_APPS
$(INSTALLED_RAMDISK_TARGET) \
)
# Tests are installed in userdata.img. If we're building the tests
# variant, copy it for "make tests dist". Also copy a zip of the
# contents of userdata.img, so that people can easily extract a
# single .apk.
ifeq ($(TARGET_BUILD_VARIANT),tests)
$(call dist-for-goals, droid, \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(BUILT_TESTS_ZIP_PACKAGE) \
)
endif
# Building a full system-- the default is to build droidcore
droid: droidcore dist_libraries

View file

@ -119,6 +119,11 @@ ifdef product_goals
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
# Hack to make the linux build servers use dexpreopt (emulator-based
# preoptimization). Most engineers don't use this type of target
# ("make PRODUCT-blah-user"), so this should only tend to happen when