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:
commit
ca2783c384
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 := \
|
||||||
$(ALL_MODULES.$(my_register_name).SYSTEM_SHARED_LIBS) $(LOCAL_SYSTEM_SHARED_LIBRARIES)
|
$(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
|
## When compiling against the VNDK, add the .vendor or .product suffix to
|
||||||
## required modules.
|
## required modules.
|
||||||
|
|
|
@ -23,6 +23,7 @@ $(MODULE_INFO_JSON):
|
||||||
'"classes_jar": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)", )], ' \
|
'"classes_jar": [$(foreach w,$(sort $(ALL_MODULES.$(m).CLASSES_JAR)),"$(w)", )], ' \
|
||||||
'"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \
|
'"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \
|
||||||
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
|
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
|
||||||
|
'"data": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)", )], ' \
|
||||||
'},\n' \
|
'},\n' \
|
||||||
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
|
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
|
||||||
$(hide) echo '}' >> $@
|
$(hide) echo '}' >> $@
|
||||||
|
|
Loading…
Reference in a new issue