releasetools: Add test cases for common.LoadInfoDict().
Fixes: 113073663
Test: python -m unittest test_common
Change-Id: I352a2731849d175f94e0f23dd68b6cf28e554f64
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 38c73fd..08f1791 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -237,6 +237,10 @@
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"