Combine HOST/TARGET in Test Suite NOTICE.

This improved NOTICE bundling now includes TARGET_OUT deps that Android
Test Suites packages need, especially those for .apk files.

Bug: b/141258651
Test: $ make cts && \
        unzip -p out/host/linux-x86/cts/android-cts.zip \
        android-cts/NOTICE.txt \
        | less -N
Change-Id: I4c84d194ff5982fc57b6a8097602d4a9df68d61c
Merged-In: I4c84d194ff5982fc57b6a8097602d4a9df68d61c
(cherry picked from commit e73186d2ac)
This commit is contained in:
wangzhou 2020-07-21 17:18:01 -07:00 committed by Colin Cross
parent e7f1725938
commit 23acb0b896
2 changed files with 17 additions and 7 deletions

View file

@ -16,7 +16,7 @@ test_suite_name := cts
test_suite_tradefed := cts-tradefed
test_suite_dynamic_config := test/suite_harness/tools/cts-tradefed/DynamicConfig.xml
test_suite_readme := test/suite_harness/tools/cts-tradefed/README
test_suite_notice := $(tools_notice_file_txt)
include_test_suite_notice := true
include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk

View file

@ -49,9 +49,21 @@ host_shared_libs := $(call copy-many-files, $(COMPATIBILITY.$(test_suite_name).H
compatibility_zip_deps := $(test_artifacts) $(test_tools) $(test_suite_prebuilt_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) $(host_shared_libs)
compatibility_zip_resources := $(out_dir)/tools $(out_dir)/testcases
ifdef test_suite_notice
compatibility_zip_deps += $(test_suite_notice)
compatibility_zip_resources += $(out_dir)/$(notdir $(test_suite_notice))
# Test Suite NOTICE files
test_suite_notice_txt := $(out_dir)/NOTICE.txt
test_suite_notice_html := $(out_dir)/NOTICE.html
$(eval $(call combine-notice-files, html, \
$(test_suite_notice_txt), \
$(test_suite_notice_html), \
"Notices for files contained in the test suites filesystem image in this directory:", \
$(HOST_OUT_NOTICE_FILES) $(TARGET_OUT_NOTICE_FILES), \
$(compatibility_zip_deps)))
ifeq ($(include_test_suite_notice),true)
compatibility_zip_deps += $(test_suite_notice_txt)
compatibility_zip_resources += $(test_suite_notice_txt)
endif
compatibility_zip := $(out_dir).zip
@ -60,7 +72,6 @@ $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir)
$(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(test_suite_prebuilt_tools)
$(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name)
$(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config)
$(compatibility_zip): PRIVATE_NOTICE := $(test_suite_notice)
$(compatibility_zip): PRIVATE_RESOURCES := $(compatibility_zip_resources)
$(compatibility_zip): $(compatibility_zip_deps) | $(ADB) $(ACP)
# Make dir structure
@ -69,7 +80,6 @@ $(compatibility_zip): $(compatibility_zip_deps) | $(ADB) $(ACP)
# Copy tools
$(hide) cp $(PRIVATE_TOOLS) $(PRIVATE_OUT_DIR)/tools
$(if $(PRIVATE_DYNAMIC_CONFIG),$(hide) cp $(PRIVATE_DYNAMIC_CONFIG) $(PRIVATE_OUT_DIR)/testcases/$(PRIVATE_SUITE_NAME).dynamic)
$(if $(PRIVATE_NOTICE),$(hide) cp $(PRIVATE_NOTICE) $(PRIVATE_OUT_DIR))
$(hide) find $(PRIVATE_RESOURCES) | sort >$@.list
$(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@) -l $@.list
@ -80,5 +90,5 @@ test_suite_dynamic_config :=
test_suite_readme :=
test_suite_prebuilt_tools :=
test_suite_tools :=
test_suite_notice :=
include_test_suite_notice :=
host_shared_libs :=