Merge "Add 'unzip' option" am: c96563d7f6 am: e15673e0cc am: d4f1ad4e59 am: 227470acf0

am: 06aeaed4c5

Change-Id: Ia0e6644d2d35e2e8287b1d19320bb1edd45451df
This commit is contained in:
Jeongik Cha
2019-08-06 22:54:16 -07:00
committed by android-build-merger
2 changed files with 8 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
build/soong/soong_ui.bash --make-mode compare_images
. build/envsetup.sh
lunch aosp_arm64
out/host/linux-x86/bin/compare_images $1
out/host/linux-x86/bin/compare_images $1 -u
echo " - Common parts"
cat common.csv
echo

View File

@@ -106,11 +106,17 @@ def main(all_targets, search_paths, ignore_signing_key=False):
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="compare_images", usage="compare_images -t model1 model2 [model...] -s dir1 [dir...] [-i]")
parser = argparse.ArgumentParser(prog="compare_images", usage="compare_images -t model1 model2 [model...] -s dir1 [dir...] [-i] [-u]")
parser.add_argument("-t", "--target", nargs='+', required=True)
parser.add_argument("-s", "--search_path", nargs='+', required=True)
parser.add_argument("-i", "--ignore_signing_key", action='store_true')
parser.add_argument("-u", "--unzip", action='store_true')
args = parser.parse_args()
if len(args.target) < 2:
parser.error("The number of targets has to be at least two.")
if args.unzip:
for t in args.target:
unzip_cmd = ["unzip", "-qd", t, os.path.join(t, "*.zip")]
unzip_cmd.extend([os.path.join(s, "*") for s in args.search_path])
subprocess.call(unzip_cmd)
main(args.target, args.search_path, args.ignore_signing_key)