Merge "Export test data dependencies in module-info" am: 802c86f831
Original change: https://android-review.googlesource.com/c/platform/build/+/1928387 Change-Id: I017a5d9c3cd227e0b1a4deaa8dface646bc0a887
This commit is contained in:
commit
2a04f251b9
2 changed files with 13 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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 '}' >> $@
|
||||
|
|
Loading…
Reference in a new issue