module-info.mk: Output actual module_name.

Add actual module_name information to module-info.json, and atest can
get the actual module name instead of module_name with suffix.

Bug: 77288544

Test: make -j8
      m out/target/product/generic_x86_64/module-info.json

Change-Id: I1e2dfced10db7ef5d31d26dfeb6a6c50a073a519
This commit is contained in:
Morris Lin 2018-08-07 21:22:21 +08:00
parent 959701f1a8
commit a77d5a2dd6
2 changed files with 2 additions and 0 deletions

View file

@ -748,6 +748,7 @@ ifdef LOCAL_2ND_ARCH_VAR_PREFIX
ALL_MODULES.$(my_register_name).FOR_2ND_ARCH := true
endif
ALL_MODULES.$(my_register_name).FOR_HOST_CROSS := $(my_host_cross)
ALL_MODULES.$(my_register_name).MODULE_NAME := $(LOCAL_MODULE)
ALL_MODULES.$(my_register_name).COMPATIBILITY_SUITES := $(LOCAL_COMPATIBILITY_SUITE)
INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(my_register_name)

View file

@ -13,6 +13,7 @@ $(MODULE_INFO_JSON):
'"installed": [$(foreach w,$(sort $(ALL_MODULES.$(m).INSTALLED)),"$(w)", )], ' \
'"compatibility_suites": [$(foreach w,$(sort $(ALL_MODULES.$(m).COMPATIBILITY_SUITES)),"$(w)", )], ' \
'"auto_test_config": [$(ALL_MODULES.$(m).auto_test_config)], ' \
'"module_name": ["$(ALL_MODULES.$(m).MODULE_NAME)"], ' \
'},\n' \
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
$(hide) echo '}' >> $@