No op build should not build minikin_tests
Previous CL[1] adds module names into LOCAL_ADDITIONAL_DEPENDENCIES, but it was wrong. LOCAL_ADDITIONAL_DEPENDENCIES only accepts file path. However, BUILD_PREBUILT doesn't provide a file path of the installed font. So use custom tool and LOCAL_GENERATED_SOURCES instead. Confirmed no-op build doesn't built minikin_tests and continuous_native_tests.zip contains all necessary files. [1]: I7d83abc077bce4e38fd93c7d607bc7e1f7871e6b BUG: 26197092 Change-Id: I90e80036248ae72e0e0f9c6144a259f5f96ec9ce
This commit is contained in:
@@ -16,21 +16,13 @@
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
data_root_for_test_zip := $(TARGET_OUT_DATA)/DATA/
|
||||
minikin_tests_subpath_from_data := nativetest/minikin_tests
|
||||
minikin_tests_root_in_device := /data/$(minikin_tests_subpath_from_data)
|
||||
minikin_tests_root_for_test_zip := $(data_root_for_test_zip)/$(minikin_tests_subpath_from_data)
|
||||
|
||||
define build-one-test-font-module
|
||||
$(eval include $(CLEAR_VARS))\
|
||||
$(eval LOCAL_MODULE := $(1))\
|
||||
$(eval LOCAL_SRC_FILES := $(1))\
|
||||
$(eval LOCAL_MODULE_CLASS := ETC)\
|
||||
$(eval LOCAL_MODULE_TAGS := tests)\
|
||||
$(eval LOCAL_MODULE_PATH := $(minikin_tests_root_for_test_zip))\
|
||||
$(eval include $(BUILD_PREBUILT))
|
||||
endef
|
||||
|
||||
font_src_files := \
|
||||
data/BoldItalic.ttf \
|
||||
data/Bold.ttf \
|
||||
@@ -49,15 +41,17 @@ font_src_files := \
|
||||
data/itemize.xml \
|
||||
data/emoji.xml
|
||||
|
||||
$(foreach f, $(font_src_files), $(call build-one-test-font-module, $(f)))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := minikin_tests
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
GEN := $(addprefix $(minikin_tests_root_for_test_zip)/, $(font_src_files))
|
||||
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
|
||||
$(GEN): $(minikin_tests_root_for_test_zip)/data/% : $(LOCAL_PATH)/data/%
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libminikin
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES = $(font_src_files)
|
||||
LOCAL_PICKUP_FILES := $(data_root_for_test_zip)
|
||||
|
||||
# Shared libraries which are dependencies of minikin; these are not automatically
|
||||
|
||||
Reference in New Issue
Block a user