Add new Test API for CTS testing.
Bug: 25608286 Change-Id: I0334061b548970959e46392dc3a1feed8533548c
This commit is contained in:
@@ -500,7 +500,7 @@ renderscript_target_api := $(LOCAL_RENDERSCRIPT_TARGET_API)
|
||||
else
|
||||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
|
@@ -62,6 +62,7 @@ SRC_SERVERS:= $(TOPDIR)servers
|
||||
SRC_TARGET_DIR := $(TOPDIR)build/target
|
||||
SRC_API_DIR := $(TOPDIR)prebuilts/sdk/api
|
||||
SRC_SYSTEM_API_DIR := $(TOPDIR)prebuilts/sdk/system-api
|
||||
SRC_TEST_API_DIR := $(TOPDIR)prebuilts/sdk/test-api
|
||||
|
||||
# Some specific paths to tools
|
||||
SRC_DROIDDOC_DIR := $(TOPDIR)build/tools/droiddoc
|
||||
@@ -720,13 +721,15 @@ TARGET_AVAILABLE_SDK_VERSIONS := $(call numerically_sort,\
|
||||
$(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%, \
|
||||
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
|
||||
|
||||
# We don't have prebuilt system_current SDK yet.
|
||||
TARGET_AVAILABLE_SDK_VERSIONS := $(TARGET_AVAILABLE_SDK_VERSIONS)
|
||||
# We don't have prebuilt test_current SDK yet.
|
||||
TARGET_AVAILABLE_SDK_VERSIONS := test_current $(TARGET_AVAILABLE_SDK_VERSIONS)
|
||||
|
||||
INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
|
||||
INTERNAL_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/removed.txt
|
||||
INTERNAL_PLATFORM_SYSTEM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-api.txt
|
||||
INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-removed.txt
|
||||
INTERNAL_PLATFORM_TEST_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/test-api.txt
|
||||
INTERNAL_PLATFORM_TEST_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/test-removed.txt
|
||||
|
||||
# This is the standard way to name a directory containing prebuilt target
|
||||
# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
|
||||
|
@@ -16,7 +16,7 @@ $(built_dpi_apk): PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
|
||||
$(built_dpi_apk): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
|
||||
$(built_dpi_apk): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR)
|
||||
$(built_dpi_apk): PRIVATE_AAPT_INCLUDES := $(all_library_res_package_exports)
|
||||
ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
$(built_dpi_apk): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
|
||||
else
|
||||
$(built_dpi_apk): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
|
||||
|
@@ -68,6 +68,9 @@ ifneq ($(LOCAL_SDK_VERSION),)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
LOCAL_JAVA_LIBRARIES := android_system_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_system_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
LOCAL_JAVA_LIBRARIES := android_test_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, android_test_stubs_current)
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
$(full_target): PRIVATE_BOOTCLASSPATH := $(call java-lib-files, sdk_v$(LOCAL_SDK_VERSION))
|
||||
|
10
core/java.mk
10
core/java.mk
@@ -31,6 +31,8 @@ ifneq ($(LOCAL_SDK_VERSION),)
|
||||
LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
LOCAL_JAVA_LIBRARIES := android_system_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
LOCAL_JAVA_LIBRARIES := android_test_stubs_current $(LOCAL_JAVA_LIBRARIES)
|
||||
else
|
||||
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
|
||||
endif
|
||||
@@ -157,7 +159,7 @@ ifneq (,$(LOCAL_RENDERSCRIPT_TARGET_API))
|
||||
else
|
||||
ifneq (,$(LOCAL_SDK_VERSION))
|
||||
# Set target-api for LOCAL_SDK_VERSIONs other than current.
|
||||
ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
renderscript_target_api := $(LOCAL_SDK_VERSION)
|
||||
endif
|
||||
endif # LOCAL_SDK_VERSION is set
|
||||
@@ -182,7 +184,7 @@ renderscript_flags := -Wall -Werror
|
||||
renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
|
||||
|
||||
# prepend the RenderScript system include path
|
||||
ifneq ($(filter-out current system_current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current,$(LOCAL_SDK_VERSION))),)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_VERSION))),)
|
||||
# if a numeric LOCAL_SDK_VERSION, or current LOCAL_SDK_VERSION with TARGET_BUILD_APPS
|
||||
LOCAL_RENDERSCRIPT_INCLUDES := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/clang-include \
|
||||
@@ -290,7 +292,7 @@ aidl_sources := $(addprefix $(LOCAL_PATH)/, $(aidl_sources))
|
||||
|
||||
aidl_preprocess_import :=
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
ifneq ($(filter current system_current, $(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS)),)
|
||||
ifneq ($(filter current system_current test_current, $(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS)),)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS
|
||||
aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
|
||||
else
|
||||
@@ -473,7 +475,7 @@ my_support_library_sdk_raise :=
|
||||
ifneq (,$(filter android-support-%,$(LOCAL_STATIC_JAVA_LIBRARIES)))
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
ifdef TARGET_BUILD_APPS
|
||||
ifeq (,$(filter current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifeq (,$(filter current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
my_support_library_sdk_raise := $(call java-lib-files, sdk_vcurrent)
|
||||
endif
|
||||
else
|
||||
|
@@ -145,9 +145,11 @@ ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
my_bootclasspath := $(call java-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_system_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_test_stubs_current)
|
||||
else
|
||||
my_bootclasspath := $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current or system_current
|
||||
endif # current, system_current, or test_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
|
||||
|
||||
@@ -284,9 +286,11 @@ ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_system_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),test_current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_test_stubs_current)
|
||||
else
|
||||
my_bootclasspath :=$(call jack-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current or system_current
|
||||
endif # current, system_current, or test_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(my_bootclasspath)
|
||||
|
||||
|
@@ -235,7 +235,7 @@ endif
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): \
|
||||
PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
|
||||
ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): \
|
||||
PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
|
||||
else
|
||||
@@ -361,7 +361,7 @@ else
|
||||
# Most packages should link against the resources defined by framework-res.
|
||||
# Even if they don't have their own resources, they may use framework
|
||||
# resources.
|
||||
ifneq ($(filter-out current system_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
# for released sdk versions, the platform resources were built into android.jar.
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
|
@@ -90,7 +90,7 @@ framework_res_package_export :=
|
||||
framework_res_package_export_deps :=
|
||||
# Please refer to package.mk
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
ifneq ($(filter-out current system_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
|
||||
framework_res_package_export := \
|
||||
$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
|
||||
framework_res_package_export_deps := $(framework_res_package_export)
|
||||
@@ -111,7 +111,7 @@ $(R_file_stamp): PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
|
||||
$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := $(intermediates.COMMON)/public_resources.xml
|
||||
$(R_file_stamp): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
|
||||
$(R_file_stamp): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
|
||||
ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
|
||||
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
|
||||
else
|
||||
$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
|
||||
|
@@ -129,4 +129,37 @@ update-system-api: $(INTERNAL_PLATFORM_SYSTEM_API_FILE) | $(ACP)
|
||||
@echo Copying system-removed.txt
|
||||
$(hide) $(ACP) $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) frameworks/base/api/system-removed.txt
|
||||
|
||||
#####################Check Test API#####################
|
||||
.PHONY: check-test-api
|
||||
checkapi : check-test-api
|
||||
|
||||
# Check that the Test API we're building hasn't changed from the not-yet-released
|
||||
# SDK version. Note that we don't check that we haven't broken the previous
|
||||
# SDK's API because the test API is meant only for CTS which is always
|
||||
# associated with the current release.
|
||||
$(eval $(call check-api, \
|
||||
checktestapi-current, \
|
||||
frameworks/base/api/test-current.txt, \
|
||||
$(INTERNAL_PLATFORM_TEST_API_FILE), \
|
||||
frameworks/base/api/test-removed.txt, \
|
||||
$(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE), \
|
||||
-error 2 -error 3 -error 4 -error 5 -error 6 \
|
||||
-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
|
||||
-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
|
||||
-error 25 -error 26 -error 27, \
|
||||
cat $(BUILD_SYSTEM)/apicheck_msg_current.txt, \
|
||||
check-test-api, \
|
||||
$(call doc-timestamp-for,test-api-stubs) \
|
||||
))
|
||||
|
||||
.PHONY: update-test-api
|
||||
update-api : update-test-api
|
||||
|
||||
update-test-api: $(INTERNAL_PLATFORM_TEST_API_FILE) | $(ACP)
|
||||
@echo Copying test-current.txt
|
||||
$(hide) $(ACP) $(INTERNAL_PLATFORM_TEST_API_FILE) frameworks/base/api/test-current.txt
|
||||
@echo Copying test-removed.txt
|
||||
$(hide) $(ACP) $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) frameworks/base/api/test-removed.txt
|
||||
|
||||
|
||||
endif
|
||||
|
Reference in New Issue
Block a user