releasetools: Add test cases for common.LoadInfoDict().

Fixes: 113073663
Test: python -m unittest test_common
Change-Id: I352a2731849d175f94e0f23dd68b6cf28e554f64
This commit is contained in:
Tao Bao
2018-08-24 12:08:38 -07:00
parent 7c76579e7a
commit a57ab9f210
2 changed files with 119 additions and 0 deletions

View File

@@ -237,6 +237,10 @@ def LoadInfoDict(input_file, input_dir=None):
makeint("boot_size")
makeint("fstab_version")
# We changed recovery.fstab path in Q, from ../RAMDISK/etc/recovery.fstab to
# ../RAMDISK/system/etc/recovery.fstab. LoadInfoDict() has to handle both
# cases, since it may load the info_dict from an old build (e.g. when
# generating incremental OTAs from that build).
system_root_image = d.get("system_root_image") == "true"
if d.get("no_recovery") != "true":
recovery_fstab_path = "RECOVERY/RAMDISK/system/etc/recovery.fstab"