From ee58bb67a573bbc90e88c458703a7d93318d5e3b Mon Sep 17 00:00:00 2001 From: Yuntao Xu Date: Thu, 27 May 2021 10:19:48 -0700 Subject: [PATCH] add LOCAL_DISABLE_TEST_CONFIG logic Disable the generation of .config file when the variable LOCAL_DISABLE_TEST_CONFIG is true. Bug: 188927912 Test: rum 'm module-name' (`android_test_helper_app` type module) Test: TreeHugger Change-Id: I64372b4ba84fcf1af937abdee345ceb1d3c2f6c5 Merged-In: I64372b4ba84fcf1af937abdee345ceb1d3c2f6c5 --- core/base_rules.mk | 6 ++++++ core/clear_vars.mk | 1 + 2 files changed, 7 insertions(+) diff --git a/core/base_rules.mk b/core/base_rules.mk index 5f654a677..1b7a279db 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -759,6 +759,12 @@ ifeq (,$(test_config)) endif is_instrumentation_test := +# Currently this flag variable is true only for the `android_test_helper_app` type module +# which should not have any .config file +ifeq (true, $(LOCAL_DISABLE_TEST_CONFIG)) + test_config := +endif + # Make sure we only add the files once for multilib modules. ifdef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files # Sync the auto_test_config value for multilib modules. diff --git a/core/clear_vars.mk b/core/clear_vars.mk index e2acb678d..94a027c06 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -61,6 +61,7 @@ LOCAL_DEX_PREOPT_GENERATE_PROFILE:= LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING:= LOCAL_DEX_PREOPT:= # '',true,false LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG:= +LOCAL_DISABLE_TEST_CONFIG:= LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES:= LOCAL_DONT_CHECK_MODULE:= # Don't delete the META_INF dir when merging static Java libraries.