diff --git a/core/autogen_test_config.mk b/core/autogen_test_config.mk index d2eb7c3880..20c582a2c6 100644 --- a/core/autogen_test_config.mk +++ b/core/autogen_test_config.mk @@ -17,8 +17,7 @@ # This build rule allows TradeFed test config file to be created based on # following inputs: # is_native: If the test is a native test. -# LOCAL_MANIFEST_FILE: Name of the AndroidManifest file for the test. If it's -# not set, default value `AndroidManifest.xml` will be used. +# full_android_manifest: Name of the AndroidManifest file for the test. # Output: # autogen_test_config_file: Path to the test config file generated. @@ -36,25 +35,17 @@ $(autogen_test_config_file) : $(autogen_test_config_template) my_auto_generate_config := true else # Auto generating test config file for instrumentation test -ifeq ($(strip $(LOCAL_MANIFEST_FILE)),) - LOCAL_MANIFEST_FILE := AndroidManifest.xml -endif -ifdef LOCAL_FULL_MANIFEST_FILE - my_android_manifest := $(LOCAL_FULL_MANIFEST_FILE) -else - my_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) -endif -ifneq (,$(wildcard $(my_android_manifest))) +ifneq (,$(full_android_manifest)) $(autogen_test_config_file): PRIVATE_AUTOGEN_TEST_CONFIG_SCRIPT := $(AUTOGEN_TEST_CONFIG_SCRIPT) -$(autogen_test_config_file): PRIVATE_TEST_CONFIG_ANDROID_MANIFEST := $(my_android_manifest) +$(autogen_test_config_file): PRIVATE_TEST_CONFIG_ANDROID_MANIFEST := $(full_android_manifest) $(autogen_test_config_file): PRIVATE_EMPTY_TEST_CONFIG := $(EMPTY_TEST_CONFIG) $(autogen_test_config_file): PRIVATE_TEMPLATE := $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE) -$(autogen_test_config_file) : $(my_android_manifest) $(EMPTY_TEST_CONFIG) $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE) $(AUTOGEN_TEST_CONFIG_SCRIPT) +$(autogen_test_config_file) : $(full_android_manifest) $(EMPTY_TEST_CONFIG) $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE) $(AUTOGEN_TEST_CONFIG_SCRIPT) @echo "Auto generating test config $(notdir $@)" @rm -f $@ $(hide) $(PRIVATE_AUTOGEN_TEST_CONFIG_SCRIPT) $@ $(PRIVATE_TEST_CONFIG_ANDROID_MANIFEST) $(PRIVATE_EMPTY_TEST_CONFIG) $(PRIVATE_TEMPLATE) my_auto_generate_config := true -endif # ifeq (,$(wildcard $(my_android_manifest))) +endif # ifneq (,$(full_android_manifest)) endif # ifneq (true,$(is_native)) ifeq (true,$(my_auto_generate_config)) @@ -65,5 +56,4 @@ else autogen_test_config_file := endif -my_android_manifest := my_auto_generate_config := diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 4224fda23e..1a33153912 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -469,6 +469,8 @@ LOCAL_CUSTOM_BUILD_STEP_INPUT:= LOCAL_CUSTOM_BUILD_STEP_OUTPUT:= LOCAL_IS_AUX_MODULE := +full_android_manifest := + # Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to # iterate over thousands of entries every time. # Leave the current makefile to make sure we don't break anything