diff options
author | Mike McTernan <mikemcternan@google.com> | 2023-10-07 08:19:28 +0100 |
---|---|---|
committer | Mike McTernan <mikemcternan@google.com> | 2023-10-07 08:30:42 +0100 |
commit | 82dc88ece8497662865296eb705c07431bdb2c2d (patch) | |
tree | 17748d1af6958547381b9cec1991a51342f6c53f | |
parent | 3fdc6cf18fd21781d51e53173434f4f0604135eb (diff) | |
download | aosp-82dc88ece8497662865296eb705c07431bdb2c2d.tar.gz |
trusty: make uuid-map.txt filename constant, use consistent zip naming
This file is within an archive that encodes the build type and number.
Therefore keep the filename constant for easier archive processing after
extraction.
Make scripts archive name consistent with symbols archive.
Bug: 303867097
Test: build.py
Change-Id: I8a9cefff28886b73dba6135fe1468b5499fa7388
-rwxr-xr-x | scripts/build.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/build.py b/scripts/build.py index df6c14d..5ac0825 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -325,7 +325,7 @@ def create_uuid_map(args, project): return f'{time:0{width}x}' proj_buildroot = os.path.join(args.build_root, "build-" + project) - filename = os.path.join(args.archive, f"{project}-{args.buildid}-uuid-map.txt") + uuidmapfile = os.path.join(args.archive, "uuid-map.txt") zipfile = os.path.join(args.archive, f"{project}-{args.buildid}.syms.zip") sym_files = list(pathlib.Path(proj_buildroot).rglob("*.syms.elf")) @@ -344,18 +344,19 @@ def create_uuid_map(args, project): f'{clock_seq_and_node[2]}{clock_seq_and_node[3]}' f'{clock_seq_and_node[4]}{clock_seq_and_node[5]}' f'{clock_seq_and_node[6]}{clock_seq_and_node[7]}') - with open(filename, 'a', encoding='utf-8') as f: + with open(uuidmapfile, 'a', encoding='utf-8') as f: f.write(f'{uuid_str}, {file.relative_to(proj_buildroot)}\n') - if os.path.exists(filename): + if os.path.exists(uuidmapfile): with ZipFile(zipfile, 'a', compression=ZIP_DEFLATED) as zip_archive: - zip_file(zip_archive, filename) - os.remove(filename) + zip_file(zip_archive, uuidmapfile) + os.remove(uuidmapfile) def create_scripts_archive(args, project): """Create an archive for the scripts""" coverage_script = os.path.join(script_dir, "genReport.py") - scripts_zip = os.path.join(args.archive, "scripts-" + args.buildid + ".zip") + scripts_zip = os.path.join(args.archive, + f"{project}-{args.buildid}.scripts.zip") if not os.path.exists(coverage_script): print("Coverage script does not exist!") return |