4ccea8549e889b4d4a17ccc11f3fb71dd97369ef |
|
07-Feb-2018 |
Tao Bao <tbao@google.com> |
releasetools: Remove the unconditional fallback to bsdiff. This CL uses the 'incomplete' tag to skip applying imgdiff to files with incomplete block list. It's not the ideal fix to address the holes in ext4 images, but would unhide other imgdiff issues covered by the unconditional fallback. Bug: 68016761 Test: Generate an incremental OTA package from images with incomplete block list. Check the imgdiff stats report. Test: `python -m unittest test_blockimgdiff` Change-Id: Ice77686414e70f5e42de35c1757fb31cf02e4fd4
/build/make/tools/releasetools/test_blockimgdiff.py
|
294651d7b4e56559822894ccc520f194363d10d8 |
|
09-Feb-2018 |
Tao Bao <tbao@google.com> |
releasetools: Add an ImgdiffStats class that reports imgdiff stats. We have a couple of active imgdiff workarounds (and likely with one more inbounding that allows having shared blocks in ext4 image). Most of these workarounds need extending imgdiff's capability. While us not getting there anytime soon, collect the stats to better understand the impact of each kind so we can prioritize accordingly. A sample report is as follows. Imgdiff Stats Report ======================== APK files diff'd with imgdiff (count: 88) ------------------------------------------- /system/priv-app/Shell/Shell.apk ... Large APK files split and diff'd with imgdiff (count: 4) ---------------------------------------------------------- /system/priv-app/Settings/Settings.apk ... Bug: 68016761 Test: Generate an incremental BBOTA package. Check the stats report. Test: python -m unittest test_blockimgdiff Change-Id: I27ad862cde472ab2806db877632ce5a0607420f2
/build/make/tools/releasetools/test_blockimgdiff.py
|
cb73aed1f00ebafe2b9319ec20e41734da9d6b88 |
|
01-Feb-2018 |
Tao Bao <tbao@google.com> |
releasetools: Refactor the condition checking for using imgdiff. In Transfer class, unbundle 'intact' with the monotonicity of the input ranges. Negate the logic of 'intact', and thus rename it to 'trimmed'. Move this property from an attribute of Transfer class as the one in RangeSet.extra. 'trimmed' indicates whether the source / target ranges have been modified after creating the Transfer() instance. The logic that determines whether we can apply imgdiff has been refactored and consolidated into BlockImageDiff.CanUseImgdiff(). Now both of the two paths call this single copy, i.e. the one that detects large APKs (before creating Transfer()'s), and the other that's about to generate the patch for a given Transfer instance. Bug: 68016761 Test: python -m unittest test_blockimgdiff Test: Generate an incremental BBOTA package. Change-Id: Id07195f63f1fa6c3af6e9091940d251cf09fa104
/build/make/tools/releasetools/test_blockimgdiff.py
|
186ec99eb9a5580bbd6404ba61b5210f524d65aa |
|
23-Dec-2017 |
Tao Bao <tbao@google.com> |
releasetools: Fix a bug in blockimgdiff.HeapItem. HeapItem defines __bool__(), which contains a logical error that should return the opposite value. Note that the bug only manifests while using Python 3, which calls __bool__(). With Python 2, `if x:` or bool(x) actually calls x.__nonzero__() or x.__len__(). If a class defines neither __len__() nor __nonzero__(), as the case in HeapItem, it always returns True. Test: python -m unittest test_blockimgdiff Test: python3 -m unittest test_blockimgdiff Test: Generate an incremental non-A/B OTA package successfully. Change-Id: Ibe8430e0b495a7d2f430cfffb716d2536ffb53d2
/build/make/tools/releasetools/test_blockimgdiff.py
|
a011dec9b28c03e3f8283de0a0e503f57f73973a |
|
25-Mar-2017 |
Tianjie Xu <xunchang@google.com> |
Fix unittest for blockimgdiff The test broke due to api change in constructor of Transfer. Bug: 36456381 Test: blockimgdiff test passes Change-Id: Ic73b66f8fb6141ff6f50c113b0d8cc55d34e0b5d
/build/make/tools/releasetools/test_blockimgdiff.py
|
304ee27e889d0b16c66a9b5d2faed379f8cad627 |
|
19-Dec-2016 |
Tao Bao <tbao@google.com> |
blockimgdiff.py: Add a test case for ReviseStashSize(). Bug: 33687949 Test: python -m unittest test_blockimgdiff Change-Id: I31e42648d2c0e60b941908c098ce5ccc967861ca
/build/make/tools/releasetools/test_blockimgdiff.py
|
334822842353669df47cec08500d4497b4b353ea |
|
25-Oct-2016 |
Tao Bao <tbao@google.com> |
releasetools: Make BBOTA incremental generation repeatable. set() doesn't keep elements according to the order of insertion. So Transfers managed with set() in intermediate steps may not appear in the same order across runs. This leads to slightly different output packages when generating the same incremental OTA. This CL fixes the issue by replacing set() with OrderedDict() in blockimgdiff.GenerateDigraph() and blockimgdiff.FindVertexSequence(). It also adds a testcase that ensures blockimgdiff.GenerateDigraph() preserves the insertion order for Transfer.goes_after set. Bug: 32220816 Test: ota_from_target_files.py gives identical package when running multiple times. Change-Id: I56d551e5ca926993ab46896e33c80e0ce42e506a
/build/make/tools/releasetools/test_blockimgdiff.py
|