diff options
author | nelsonli <nelsonli@google.com> | 2018-07-24 17:23:19 +0800 |
---|---|---|
committer | nelsonli <nelsonli@google.com> | 2018-08-05 01:35:06 +0800 |
commit | 9009311630852032233b483505b75de74fa367d8 (patch) | |
tree | 3163928a9ecb1cf68aacf57e8e9d6c7da867b584 | |
parent | 6e5b55bf7f33a111506d986ad9aaf0bc5221e735 (diff) | |
download | build-9009311630852032233b483505b75de74fa367d8.tar.gz |
Build System: Add variable for copying test config
If LOCAL_TEST_CONFIG is set, it will be the default test config
and ignore the local AndroidTest.xml.
BUG: 110982517
Test: vi art/tools/ahat/Android.mk
set LOCAL_TEST_CONFIG := ahat_test.xml
add ahat_test.xml in local
m -j ahat;
Then, out/host/linux-x86/testcases/ahat/ahat.config
and ahat_test.xml should be the same.
Change-Id: I2f4ef735fca7d523bb637a18075512bdebf9826f
-rw-r--r-- | core/base_rules.mk | 7 | ||||
-rw-r--r-- | core/clear_vars.mk | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk index 770a16c414..037b2cb081 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -583,8 +583,11 @@ else $(eval n := $(or $(word 2,$(p)),$(notdir $(word 1, $(p))))) \ $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \ $(s):$(dir)/$(n))))) - - test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml) + ifeq (,$(LOCAL_TEST_CONFIG)) + test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml) + else + test_config := $(LOCAL_PATH)/$(LOCAL_TEST_CONFIG) + endif ifeq (,$(test_config)) ifneq (true,$(is_native)) is_instrumentation_test := true diff --git a/core/clear_vars.mk b/core/clear_vars.mk index e7116a5963..1c45b2bc99 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -266,6 +266,7 @@ LOCAL_STATIC_LIBRARIES:= LOCAL_STRIP_MODULE:= LOCAL_SYSTEM_SHARED_LIBRARIES:=none LOCAL_TARGET_REQUIRED_MODULES:= +LOCAL_TEST_CONFIG:= LOCAL_TEST_CONFIG_OPTIONS:= LOCAL_TEST_DATA:= LOCAL_TEST_MODULE_TO_PROGUARD_WITH:= |