Merge "Export test data dependencies in module-info" am: 802c86f831 am: 2a04f251b9

Original change: https://android-review.googlesource.com/c/platform/build/+/1928387

Change-Id: I1b42b3e7acdaa94a6b6b1920159c481e6f814995
This commit is contained in:
Treehugger Robot 2022-01-07 01:15:32 +00:00 committed by Automerger Merge Worker
commit ca2783c384
2 changed files with 13 additions and 0 deletions

View file

@ -981,6 +981,18 @@ ALL_MODULES.$(my_register_name).SHARED_LIBS := \
ALL_MODULES.$(my_register_name).SYSTEM_SHARED_LIBS := \
$(ALL_MODULES.$(my_register_name).SYSTEM_SHARED_LIBS) $(LOCAL_SYSTEM_SHARED_LIBRARIES)
ifdef LOCAL_TEST_DATA
# Export the list of targets that are handled as data inputs and required
# by tests at runtime. The LOCAL_TEST_DATA format is generated from below
# https://cs.android.com/android/platform/superproject/+/master:build/soong/android/androidmk.go;l=925-944;drc=master
# which format is like $(path):$(relative_file) but for module-info, only
# the string after ":" is needed.
ALL_MODULES.$(my_register_name).TEST_DATA := \
$(strip $(ALL_MODULES.$(my_register_name).TEST_DATA) \
$(foreach f, $(LOCAL_TEST_DATA),\
$(call word-colon,2,$(f))))
endif
##########################################################################
## When compiling against the VNDK, add the .vendor or .product suffix to
## required modules.

View file

@ -23,6 +23,7 @@ $(MODULE_INFO_JSON):
'"classes_jar": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)", )], ' \
'"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
'"data": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)", )], ' \
'},\n' \
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
$(hide) echo '}' >> $@