Merge "Don't recompute location of AndroidManifest.xml"

This commit is contained in:
Treehugger Robot 2018-05-18 00:00:24 +00:00 committed by Gerrit Code Review
commit 1b02cfd8ab
2 changed files with 7 additions and 15 deletions

View file

@ -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 :=

View file

@ -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