diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-10-13 18:32:07 +0000 |
---|---|---|
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-10-13 18:34:43 +0000 |
commit | 74c5ef0f0224e15b46544a13d9e0b7926cd50a25 (patch) | |
tree | cd9f992c39172c11b6cfd2b3eb4a9f7faf603c58 | |
parent | dc8778d1863977e58c46c13b510aa03a6b77f11d (diff) | |
parent | 456485fa064f1369bd709b9e6f4d0747ae28f136 (diff) | |
download | build-74c5ef0f0224e15b46544a13d9e0b7926cd50a25.tar.gz |
Make change and version bump to OCR1.201013.001
Change-Id: I46a12bed8c96cba6eca95081f209a672caf2cca2
-rw-r--r-- | core/Makefile | 2 | ||||
-rw-r--r-- | core/build_id.mk | 2 | ||||
-rw-r--r-- | core/tasks/cts.mk | 1 | ||||
-rw-r--r-- | core/tasks/tools/compatibility.mk | 25 | ||||
-rw-r--r-- | core/version_defaults.mk | 2 | ||||
-rwxr-xr-x | tools/generate-notice-files.py | 66 |
6 files changed, 61 insertions, 37 deletions
diff --git a/core/Makefile b/core/Makefile index f1a5b7f610..2cd90fa93a 100644 --- a/core/Makefile +++ b/core/Makefile @@ -747,7 +747,7 @@ $(3) : $(6) $(BUILD_SYSTEM)/Makefile build/tools/generate-notice-files.py $(if $(filter $(1),xml_excluded_vendor),-e vendor --xml-output, \ $(if $(filter $(1),xml_vendor),-i vendor --xml-output, \ --html-output)) $(3) \ - -t $$(PRIVATE_MESSAGE) -s $$(PRIVATE_DIR)/src + -t $$(PRIVATE_MESSAGE) $$(foreach dir,$$(sort $$(PRIVATE_DIR)), -s $$(dir)/src) notice_files: $(2) $(3) endef diff --git a/core/build_id.mk b/core/build_id.mk index 24d7473379..e6ba887982 100644 --- a/core/build_id.mk +++ b/core/build_id.mk @@ -18,4 +18,4 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention. -export BUILD_ID=OCR1.200713.001 +export BUILD_ID=OCR1.201013.001 diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk index fdd9591768..c09daeb4af 100644 --- a/core/tasks/cts.mk +++ b/core/tasks/cts.mk @@ -16,6 +16,7 @@ test_suite_name := cts test_suite_tradefed := cts-tradefed test_suite_dynamic_config := cts/tools/cts-tradefed/DynamicConfig.xml test_suite_readme := cts/tools/cts-tradefed/README +include_test_suite_notice := true include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk diff --git a/core/tasks/tools/compatibility.mk b/core/tasks/tools/compatibility.mk index 20b831409b..e49ae50fc8 100644 --- a/core/tasks/tools/compatibility.mk +++ b/core/tasks/tools/compatibility.mk @@ -36,19 +36,39 @@ test_tools := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar \ $(HOST_OUT_EXECUTABLES)/$(test_suite_tradefed) \ $(test_suite_readme) +compatibility_zip_deps := $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) +compatibility_zip_resources := $(out_dir)/tools $(out_dir)/testcases + +# 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 $(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name) $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir) $(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name) $(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config) -$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP) +$(compatibility_zip): PRIVATE_RESOURCES := $(compatibility_zip_resources) +$(compatibility_zip): $(compatibility_zip_deps) | $(ADB) $(ACP) # Make dir structure $(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases # Copy tools $(hide) $(ACP) -fp $(PRIVATE_TOOLS) $(PRIVATE_OUT_DIR)/tools $(if $(PRIVATE_DYNAMIC_CONFIG),$(hide) $(ACP) -fp $(PRIVATE_DYNAMIC_CONFIG) $(PRIVATE_OUT_DIR)/testcases/$(PRIVATE_SUITE_NAME).dynamic) - $(hide) find $(dir $@)/$(PRIVATE_NAME) | sort >$@.list + $(hide) find $(PRIVATE_RESOURCES) | sort >$@.list $(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@) -l $@.list # Reset all input variables @@ -56,3 +76,4 @@ test_suite_name := test_suite_tradefed := test_suite_dynamic_config := test_suite_readme := +include_test_suite_notice := diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 996900ba99..c4d926ac73 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -165,7 +165,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2017-11-05 + PLATFORM_SECURITY_PATCH := 2017-08-05 endif ifndef PLATFORM_BASE_OS diff --git a/tools/generate-notice-files.py b/tools/generate-notice-files.py index adbf7c2315..2c319abb6b 100755 --- a/tools/generate-notice-files.py +++ b/tools/generate-notice-files.py @@ -73,10 +73,10 @@ body { padding: 0; font-family: sans-serif; } </style> """ -def combine_notice_files_html(file_hash, input_dir, output_filename): +def combine_notice_files_html(file_hash, input_dirs, output_filename): """Combine notice files in FILE_HASH and output a HTML version to OUTPUT_FILENAME.""" - SRC_DIR_STRIP_RE = re.compile(input_dir + "(/.*).txt") + SRC_DIR_STRIP_RE = re.compile("(?:" + "|".join(input_dirs) + ")(/.*).txt") # Set up a filename to row id table (anchors inside tables don't work in # most browsers, but href's to table row ids do) @@ -131,10 +131,10 @@ def combine_notice_files_html(file_hash, input_dir, output_filename): print >> output_file, "</body></html>" output_file.close() -def combine_notice_files_text(file_hash, input_dir, output_filename, file_title): +def combine_notice_files_text(file_hash, input_dirs, output_filename, file_title): """Combine notice files in FILE_HASH and output a text version to OUTPUT_FILENAME.""" - SRC_DIR_STRIP_RE = re.compile(input_dir + "(/.*).txt") + SRC_DIR_STRIP_RE = re.compile("(?:" + "|".join(input_dirs) + ")(/.*).txt") output_file = open(output_filename, "wb") print >> output_file, file_title for value in file_hash: @@ -146,10 +146,10 @@ def combine_notice_files_text(file_hash, input_dir, output_filename, file_title) print >> output_file, open(value[0]).read() output_file.close() -def combine_notice_files_xml(files_with_same_hash, input_dir, output_filename): +def combine_notice_files_xml(files_with_same_hash, input_dirs, output_filename): """Combine notice files in FILE_HASH and output a XML version to OUTPUT_FILENAME.""" - SRC_DIR_STRIP_RE = re.compile(input_dir + "(/.*).txt") + SRC_DIR_STRIP_RE = re.compile("(?:" + "|".join(input_dirs) + ")(/.*).txt") # Set up a filename to row id table (anchors inside tables don't work in # most browsers, but href's to table row ids do) @@ -205,7 +205,7 @@ def get_args(): '-t', '--title', required=True, help='The file title.') parser.add_argument( - '-s', '--source-dir', required=True, + '-s', '--source-dir', required=True, action='append', help='The directory containing notices.') parser.add_argument( '-i', '--included-subdirs', action='append', @@ -229,40 +229,42 @@ def main(argv): if args.excluded_subdirs is not None: excluded_subdirs = args.excluded_subdirs + input_dirs = [os.path.normpath(source_dir) for source_dir in args.source_dir] # Find all the notice files and md5 them - input_dir = os.path.normpath(args.source_dir) - files_with_same_hash = defaultdict(list) - for root, dir, files in os.walk(input_dir): - for file in files: - matched = True - if len(included_subdirs) > 0: - matched = False - for subdir in included_subdirs: - if root.startswith(input_dir + '/' + subdir): - matched = True - break - elif len(excluded_subdirs) > 0: - for subdir in excluded_subdirs: - if root.startswith(input_dir + '/' + subdir): - matched = False - break - if matched and file.endswith(".txt"): - filename = os.path.join(root, file) - file_md5sum = md5sum(filename) - files_with_same_hash[file_md5sum].append(filename) - - filesets = [sorted(files_with_same_hash[md5]) for md5 in sorted(files_with_same_hash.keys())] + for input_dir in input_dirs: + files_with_same_hash = defaultdict(list) + for root, dir, files in os.walk(input_dir): + for file in files: + matched = True + if len(included_subdirs) > 0: + matched = False + for subdir in included_subdirs: + if root.startswith(input_dir + '/' + subdir): + matched = True + break + elif len(excluded_subdirs) > 0: + for subdir in excluded_subdirs: + if root.startswith(input_dir + '/' + subdir): + matched = False + break + if matched and file.endswith(".txt"): + filename = os.path.join(root, file) + file_md5sum = md5sum(filename) + files_with_same_hash[file_md5sum].append(filename) + + filesets = [sorted(files_with_same_hash[md5]) for md5 in sorted(files_with_same_hash.keys())] print "Combining NOTICE files into text" - combine_notice_files_text(filesets, input_dir, txt_output_file, file_title) + + combine_notice_files_text(filesets, input_dirs, txt_output_file, file_title) if html_output_file is not None: print "Combining NOTICE files into HTML" - combine_notice_files_html(filesets, input_dir, html_output_file) + combine_notice_files_html(filesets, input_dirs, html_output_file) if xml_output_file is not None: print "Combining NOTICE files into XML" - combine_notice_files_xml(files_with_same_hash, input_dir, xml_output_file) + combine_notice_files_xml(files_with_same_hash, input_dirs, xml_output_file) if __name__ == "__main__": main(sys.argv) |