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
diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk
index b45526f..38149d7 100644
--- a/core/tasks/module-info.mk
+++ b/core/tasks/module-info.mk
@@ -13,6 +13,7 @@
'"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 '}' >> $@