From 0ba6ec6f49be8ca24333ca4e402605f6cce82d50 Mon Sep 17 00:00:00 2001 From: kellyhung Date: Fri, 28 Aug 2020 00:19:53 +0800 Subject: [PATCH] Add test_mainline_modules option support in mk Bug: 165425972 Test: Apply aosp/1418212 atest -b hello_world_test Check module-info.json for hello_world_test HelloWorldTests and HelloWorldHostTest Change-Id: Ie30a09a54b0ae927ca4d8d1aaba2ac0cdb15233a --- core/base_rules.mk | 1 + core/clear_vars.mk | 1 + core/tasks/module-info.mk | 1 + 3 files changed, 3 insertions(+) diff --git a/core/base_rules.mk b/core/base_rules.mk index 7397470465..da6991e62d 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -981,6 +981,7 @@ ALL_MODULES.$(my_register_name).MODULE_NAME := $(LOCAL_MODULE) ALL_MODULES.$(my_register_name).COMPATIBILITY_SUITES := $(LOCAL_COMPATIBILITY_SUITE) ALL_MODULES.$(my_register_name).TEST_CONFIG := $(test_config) ALL_MODULES.$(my_register_name).EXTRA_TEST_CONFIGS := $(LOCAL_EXTRA_FULL_TEST_CONFIGS) +ALL_MODULES.$(my_register_name).TEST_MAINLINE_MODULES := $(LOCAL_TEST_MAINLINE_MODULES) test_config := INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(my_register_name) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 9c29974204..d515db3ce4 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -300,6 +300,7 @@ LOCAL_SYSTEM_SHARED_LIBRARIES:=none LOCAL_TARGET_REQUIRED_MODULES:= LOCAL_TEST_CONFIG:= LOCAL_TEST_DATA:= +LOCAL_TEST_MAINLINE_MODULES:= LOCAL_TEST_MODULE_TO_PROGUARD_WITH:= LOCAL_TIDY:= LOCAL_TIDY_CHECKS:= diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk index d9aebedf07..cf32d652c5 100644 --- a/core/tasks/module-info.mk +++ b/core/tasks/module-info.mk @@ -19,6 +19,7 @@ $(MODULE_INFO_JSON): '"srcs": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCS)),"$(w)", )], ' \ '"srcjars": [$(foreach w,$(sort $(ALL_MODULES.$(m).SRCJARS)),"$(w)", )], ' \ '"classes_jar": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)", )], ' \ + '"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \ '},\n' \ ) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@ $(hide) echo '}' >> $@