summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/test_common.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix the permission setting in common.ZipWriteStr()Tao Bao2015-05-201-5/+43
| | | | | | | | | | | | | When passing a ZipInfo instance to common.ZipWriteStr(), the external_attr attribute should not be overwritten unless specified. We didn't have the issue previously because we were calling ZipFile.writestr() directly until [1] merged. [1] commit 2ed665a033c587b276b1615516e5354e2ace47cd. Bug: http://b/21309935 Change-Id: I8c0190362c60d7d78965ecfe5e484f8398ddc5f2 (cherry picked from commit 97734654099431bd6c5bd2eeb5d34af0e2dc03e7)
* Wrap zipfile.write(), writestr() and close()Tao Bao2015-05-081-31/+180
| | | | | | | | | | In order to work around the zip 2GiB limit, we need to wrap the related functions in zipfile. Calls to those functions should always be replaced with calls to the wrappers instead. Bug: 18015246 Change-Id: I499574cee51ec4804bc10cbefe0b17940afed918 (cherry picked from commit 2ed665a033c587b276b1615516e5354e2ace47cd)
* Run ZipFile.testzip() during zipfile tests.Dan Albert2015-03-231-0/+2
| | | | | | | | | This still doesn't catch the issue that [1] fixes, but it's probably a good idea anyway. [1]: https://android-review.googlesource.com/#/c/143469/ Change-Id: Iaa607ec7450d605b26114bd81ea41a14c6613c0e
* Allow system images larger than 2GiB.Dan Albert2015-03-191-0/+108
Python 2.7's zipfile implementation wrongly thinks that zip64 is required for files larger than 2GiB. We can work around this by adjusting their limit. Note that `zipfile.writestr()` will not work for strings larger than 2GiB. The Python interpreter sometimes rejects strings that large (though it isn't clear to me exactly what circumstances cause this). `zipfile.write()` must be used directly to work around this. This mess can be avoided if we port to python3. The bug (b/19364241) in original commit has been fixed. Bug: 18015246 Bug: 19364241 Bug: 19839468 (cherry picked from commit cd082d4bfe917b2e6b97436839cbbbc67c733c83) Change-Id: I7b5cc310e0a9ba894533b53cb998afd5ce96d8c6