aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2017-12-05 23:49:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-12-05 23:49:21 +0000
commit9681de48fe07246b6978ab347ac24e2aa813e080 (patch)
treeba457409ad508f9f7b92c06667e404a8097664a0
parent17f6516ef740a069f146df777f6325ab737e6cf5 (diff)
parent94cc445411c195d78de060f17fcdfc0bc1ff08c9 (diff)
downloadbuild-nougat-cts-release.tar.gz
-rw-r--r--CleanSpec.mk3
-rw-r--r--core/base_rules.mk41
-rw-r--r--core/build_id.mk2
-rw-r--r--core/definitions.mk24
-rw-r--r--core/envsetup.mk7
-rw-r--r--core/java.mk11
-rw-r--r--core/package_internal.mk13
-rw-r--r--core/version_defaults.mk11
8 files changed, 71 insertions, 41 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 3c8d6ceb9c..b311470571 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -374,6 +374,9 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
# $(PRODUCT_OUT)/recovery/root/sdcard goes from symlink to folder.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sdcard)
+$(call add-clean-step, rm -rf $(HOST_OUT_TESTCASES))
+$(call add-clean-step, rm -rf $(TARGET_OUT_TESTCASES))
+
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 6722af4f27..0e3bd6893a 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -368,47 +368,44 @@ endif
endif
###########################################################
-## Compatibiliy suite files.
+## Compatibility suite files.
###########################################################
ifdef LOCAL_COMPATIBILITY_SUITE
-ifneq ($(words $(LOCAL_COMPATIBILITY_SUITE)),1)
-$(error $(LOCAL_PATH):$(LOCAL_MODULE) LOCAL_COMPATIBILITY_SUITE can be only one name)
-endif
# The module itself.
-my_compat_dist := \
- $(LOCAL_BUILT_MODULE):$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(my_installed_module_stem)
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem))))
# Make sure we only add the files once for multilib modules.
ifndef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files := true
# LOCAL_COMPATIBILITY_SUPPORT_FILES is a list of <src>[:<dest>].
-my_compat_dist += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES),\
- $(eval p := $(subst :,$(space),$(f)))\
- $(eval s := $(word 1,$(p)))\
- $(eval d := $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(or $(word 2,$(p)),$(notdir $(word 1,$(p)))))\
- $(s):$(d))
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \
+ $(eval p := $(subst :,$(space),$(f))) \
+ $(eval s := $(word 1,$(p))) \
+ $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \
+ $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(s):$(dir)/$(n)))))
+
ifneq (,$(wildcard $(LOCAL_PATH)/AndroidTest.xml))
-my_compat_dist += \
- $(LOCAL_PATH)/AndroidTest.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).config
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(LOCAL_PATH)/AndroidTest.xml:$(dir)/$(LOCAL_MODULE).config)))
endif
ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml))
-my_compat_dist += \
- $(LOCAL_PATH)/DynamicConfig.xml:$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE).dynamic
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic)))
endif
endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
-my_compat_files := $(call copy-many-files, $(my_compat_dist))
-
-COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \
- $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \
- $(my_compat_files)
+$(call create-suite-dependencies)
-# Copy over the compatibility files when user runs mm/mmm.
-$(my_register_name) : $(my_compat_files)
endif # LOCAL_COMPATIBILITY_SUITE
###########################################################
diff --git a/core/build_id.mk b/core/build_id.mk
index 50f7b95675..5a012b99cb 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-export BUILD_ID=NRD91N
+export BUILD_ID=NYC
diff --git a/core/definitions.mk b/core/definitions.mk
index b9ef4d57f1..cadad6e8fb 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2887,6 +2887,30 @@ $(strip $(if $(filter $(TARGET_ARCH),$(1)),$(TARGET_ARCH),\
endef
###########################################################
+## Compatibility suite tools
+###########################################################
+
+# Return a list of output directories for a given suite and the current LOCAL_MODULE
+define compatibility_suite_dirs
+ $(strip \
+ $(COMPATIBILITY_TESTCASES_OUT_$(1)) \
+ $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE))
+endef
+
+# For each suite:
+# 1. Copy the files to the many suite output directories.
+# 2. Add all the files to each suite's dependent files list.
+# 3. Do the dependency addition to my_all_targets
+# Requires for each suite: my_compat_dist_$(suite) to be defined.
+define create-suite-dependencies
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_files_$(suite) := $(call copy-many-files, $(my_compat_dist_$(suite)))) \
+ $(eval COMPATIBILITY.$(suite).FILES := \
+ $(COMPATIBILITY.$(suite).FILES) $(my_compat_files_$(suite))) \
+ $(eval $(my_register_name) : $(my_compat_files_$(suite))))
+endef
+
+###########################################################
## Other includes
###########################################################
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 0a72603372..419a6c6c6f 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -245,6 +245,9 @@ HOST_OUT_SDK_ADDON := $(HOST_OUT)/sdk_addon
HOST_CROSS_OUT_EXECUTABLES := $(HOST_CROSS_OUT)/bin
HOST_CROSS_OUT_SHARED_LIBRARIES := $(HOST_CROSS_OUT)/lib
+HOST_CROSS_OUT_NATIVE_TESTS := $(HOST_CROSS_OUT)/nativetest
+HOST_CROSS_OUT_COVERAGE := $(HOST_CROSS_OUT)/coverage
+HOST_OUT_TESTCASES := $(HOST_OUT)/testcases
HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj
HOST_OUT_HEADERS := $(HOST_OUT_INTERMEDIATES)/include
@@ -271,6 +274,8 @@ $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES := $($(HOST_2ND_ARCH_
$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib
$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_EXECUTABLES := $(HOST_OUT_EXECUTABLES)
$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_JAVA_LIBRARIES := $(HOST_OUT_JAVA_LIBRARIES)
+$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_NATIVE_TESTS := $(HOST_OUT)/nativetest
+$(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_TESTCASES := $(HOST_OUT_TESTCASES)
# The default host library path.
# It always points to the path where we build libraries in the default bitness.
@@ -321,6 +326,7 @@ TARGET_OUT_KEYCHARS := $(TARGET_OUT)/usr/keychars
TARGET_OUT_ETC := $(TARGET_OUT)/etc
TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
+TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases
# Out for TARGET_2ND_ARCH
TARGET_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
@@ -332,6 +338,7 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_A
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS)
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS_PRIVILEGED := $(TARGET_OUT_APPS_PRIVILEGED)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_TESTCASES := $(TARGET_OUT_TESTCASES)
TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_EXECUTABLES)
diff --git a/core/java.mk b/core/java.mk
index 2602daf53a..bc8ed645b4 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -459,8 +459,6 @@ $(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(ACP)
$(hide) $(ACP) -fp $< $@
endif
-full_classes_jar_source := $(full_classes_jarjar_jar)
-ifndef LOCAL_JACK_ENABLED
ifeq ($(LOCAL_EMMA_INSTRUMENT),true)
$(full_classes_emma_jar): PRIVATE_EMMA_COVERAGE_FILE := $(intermediates.COMMON)/coverage.emma.ignore
$(full_classes_emma_jar): PRIVATE_EMMA_INTERMEDIATES_DIR := $(emma_intermediates_dir)
@@ -477,12 +475,15 @@ endif
# $(full_classes_emma_jar)
$(full_classes_emma_jar): $(full_classes_jarjar_jar) | $(EMMA_JAR)
$(transform-classes.jar-to-emma)
-full_classes_jar_source := $(full_classes_emma_jar)
-endif
+
+else
+$(full_classes_emma_jar): $(full_classes_jarjar_jar) | $(ACP)
+ @echo Copying: $@
+ $(copy-file-to-target)
endif
# Keep a copy of the jar just before proguard processing.
-$(full_classes_jar): $(full_classes_jar_source) | $(ACP)
+$(full_classes_jar): $(full_classes_emma_jar) | $(ACP)
@echo Copying: $@
$(hide) $(ACP) -fp $< $@
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 551f18e57b..78cc735603 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -636,15 +636,14 @@ ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
$(my_register_name): $(installed_apk_splits)
ifdef LOCAL_COMPATIBILITY_SUITE
-cts_testcase_file := $(foreach s,$(my_split_suffixes),$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_$(s).apk)
-$(cts_testcase_file) : $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP)
- $(copy-file-to-new-target)
-COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \
- $(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \
- $(cts_testcase_file)
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(foreach s,$(my_split_suffixes),\
+ $(built_module_path)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk))))
+
+$(call create-suite-dependencies)
-$(my_register_name) : $(cts_testcase_file)
endif # LOCAL_COMPATIBILITY_SUITE
endif # LOCAL_PACKAGE_SPLITS
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 7ca1375e5a..5dffcaccb8 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -109,12 +109,11 @@ ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
endif
ifeq "" "$(PLATFORM_SECURITY_PATCH)"
- # Used to indicate the security patch that has been applied to the device.
- # It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
- # It must be of the form "YYYY-MM-DD" on production devices.
- # It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
- # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
- PLATFORM_SECURITY_PATCH := 2016-11-05
+ # Used to indicate the security patch that has been applied to the device.
+ # Must be of the form "YYYY-MM-DD" on production devices.
+ #
+ # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
+ PLATFORM_SECURITY_PATCH := 2016-08-05
endif
ifeq "" "$(PLATFORM_BASE_OS)"