Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Gunnerson 003fbf18ba tests/downloader.py: Add MiB/s to DefaultDisplayCallback output
No fancy algorithm. Just a simple moving average over 5 seconds, updated
at 100ms intervals.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-03-01 17:44:17 -05:00
Andrew Gunnerson 76eec8fb6e tests/downloader.py: Avoid unnecessary buffer allocations in DownloadWorker
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-03-01 17:44:16 -05:00
Andrew Gunnerson db562315e9 tests: Drop aria2 dependency
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-03-01 17:44:15 -05:00
Andrew Gunnerson 69cb0dd4d7 tests: Add native Python parallel download implementation
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-03-01 17:44:03 -05:00
Andrew Gunnerson d74f7c77ff tests: README.md: Document that --prepatched is now tested
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-26 22:41:54 -05:00
Andrew Gunnerson d80ce411c7 Add support for using prepatched boot images
This is useful for folks who want to apply the Magisk root patch
themselves via the Magisk app or use KernelSU. When `--prepatched` is
used, avbroot will skip the root patch, but still apply the otacerts
patch.

To help protect against accidental use of the wrong boot image, avbroot
will only accept a prepatched image if all the header fields and section
types match the original image. The only exception is the number of
ramdisks, which is allowed to increase (Magisk may create a ramdisk in
an image that didn't originally have one).

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-26 18:01:03 -05:00
Andrew Gunnerson 545a2a9587 tests/tests_containerized.py: Include elapsed time in result table
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-16 22:32:18 -05:00
Andrew Gunnerson 37ef00d7b4 tests/tests_containerized.py: Fix swapped if condition for network access
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-16 21:57:36 -05:00
Andrew Gunnerson 2238c37556 tests: Add new image for running tests for Windows in Wine
Yes, this is installing msys2 packages directory on the Arch Linux root
filesystem. Yes, it works!

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-16 21:57:15 -05:00
Andrew Gunnerson 7557d30183 tests: Add infrastructure for running tests in podman
The officially supported distros are now Alpine, Arch, Debian, Fedora,
Fedora, OpenSUSE, and Ubuntu. The new script will build images for these
distros and concurrently run tests.py inside containers.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-14 23:55:34 -05:00
Andrew Gunnerson 98bd336c91 Add new bootimagetool utility for working with boot images
This just adds a simple CLI for avbroot.formats.bootimage library. It's
not strictly related to avbroot, but is useful for troubleshooting since
the library supports all AOSP-compatible boot images.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-14 01:47:10 -05:00
Andrew Gunnerson 904a9f666a Add end-to-end patching tests
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-02-13 22:14:27 -05:00