Merge "Specify --max_timestamp when calling brillo_update_payload."

This commit is contained in:
TreeHugger Robot 2017-10-09 21:41:49 +00:00 committed by Android (Google) Code Review
commit 800b7a3b2f

View file

@ -1125,6 +1125,11 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
"--target_image", target_file]
if source_file is not None:
cmd.extend(["--source_image", source_file])
if OPTIONS.downgrade:
max_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
else:
max_timestamp = metadata["post-timestamp"]
cmd.extend(["--max_timestamp", max_timestamp])
p1 = common.Run(cmd, stdout=log_file, stderr=subprocess.STDOUT)
p1.communicate()
assert p1.returncode == 0, "brillo_update_payload generate failed"