1LOCAL_PATH := $(call my-dir) 2 3# Build a module that has all of the python files as its LOCAL_PICKUP_FILES. 4# Since no action needs to be taken to compile the python source, just 5# use BUILD_PHONY_PACKAGE to give us a target to execute. 6include $(CLEAR_VARS) 7 8LOCAL_MODULE := bootloader_unit_test 9LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 10LOCAL_LICENSE_CONDITIONS := notice 11LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE 12LOCAL_MODULE_TAGS := tests 13 14bootloader_py_files := $(call find-subdir-files, *.py) 15 16bootloader_zip_prefix := $(TARGET_OUT_DATA)/py_bootloader 17bootloader_zip_path := $(bootloader_zip_prefix)/nativetest/py_bootloader 18 19GEN := $(addprefix $(bootloader_zip_path)/, $(bootloader_py_files)) 20$(GEN) : PRIVATE_PATH := $(LOCAL_PATH) 21$(GEN) : PRIVATE_CUSTOM_TOOL = cp $< $@ 22$(GEN) : $(bootloader_zip_path)/% : $(LOCAL_PATH)/% 23 $(transform-generated-source) 24 25LOCAL_PICKUP_FILES := $(bootloader_zip_prefix)/nativetest 26LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN) 27 28include $(BUILD_PHONY_PACKAGE) 29