Add data_bins to data_dependencies in module-info

This change exports the list of test_data_bins as data dependencies
that are required by modules when running the test.

Bug: 215234071
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ie5c1ef70055618a5fa0ba1bcfbcba8054743d41a
This commit is contained in:
yangbill 2022-02-11 18:27:32 +08:00 committed by Bill Yang
parent b194430f63
commit e6b498bf2d
3 changed files with 7 additions and 0 deletions

View file

@ -996,6 +996,11 @@ ifdef LOCAL_TEST_DATA
$(call word-colon,2,$(f))))
endif
ifdef LOCAL_TEST_DATA_BINS
ALL_MODULES.$(my_register_name).TEST_DATA_BINS := \
$(ALL_MODULES.$(my_register_name).TEST_DATA_BINS) $(LOCAL_TEST_DATA_BINS)
endif
##########################################################################
## When compiling against the VNDK, add the .vendor or .product suffix to
## required modules.

View file

@ -318,6 +318,7 @@ LOCAL_SYSTEM_SHARED_LIBRARIES:=none
LOCAL_TARGET_REQUIRED_MODULES:=
LOCAL_TEST_CONFIG:=
LOCAL_TEST_DATA:=
LOCAL_TEST_DATA_BINS:=
LOCAL_TEST_MAINLINE_MODULES:=
LOCAL_TEST_MODULE_TO_PROGUARD_WITH:=
LOCAL_TIDY:=

View file

@ -26,6 +26,7 @@ $(MODULE_INFO_JSON):
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
'"data": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)", )], ' \
'"runtime_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).LOCAL_RUNTIME_LIBRARIES)),"$(w)", )], ' \
'"data_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA_BINS)),"$(w)", )], ' \
'},\n' \
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
$(hide) echo '}' >> $@