Add test to two classes: BuildInfo and TargetLib. BuildInfo is a
dataclass which can store and parse Android Build informations from an
OTA package. TargetLib is a database interface which can be used to
store and extract BuildInfo.
Please refer to this CL for more details of these two classes:
https://android-review.googlesource.com/c/platform/development/+/1735315
Test: python test_target_lib.py -v
Change-Id: I3b2143af7f3708207b6c53744d903d3dcee92d55
If a single read request contains the entire manifest, we will return
right after prefixLength is computed, and the UI just hangs there.
Test: load a small OTA pkg
Change-Id: Idb93fdba103f9c6e7b14974b45d1aecdb2ae9168
The ProcessManagement helps initiate OTA generation processes and
monitor those processes. Add some test and comments to this class.
Please refer to:
https://android-review.googlesource.com/c/platform/development/+/1736940
for more details.
Test: python test_ota_interface.py -v
Change-Id: Ib22fca4c5a670f8b55db8a4175fef16d92eaceaf
Add testcases for ota_interface.JobInfo, which is used as object to
store task information and serve/read data to/from database.
Refer to:
https://android-review.googlesource.com/c/platform/development/+/1736940
for more details.
Test: python test_ota_interface.py -v
Change-Id: I74dcb16390078bd9258da490e21cb2b73dd78e81
The os.path.join() will bring in an unwanted backslash.
Test: Tested by starting a new OTA generation process by calling
ota_interface.ota_generate directly.
Test: python test_ota_interface.py -v
Change-Id: I8449eea79303f5aff5188176538eca1291101dff
Jest is a JavaScript test framework. Test-utils is used to test vue
components.
No-Typo-Check: auto-generated artifacts
Test: npm run test.
Change-Id: I2466687120b96a3a393299d127c6d7e1f15204e7
Disable the 'Analyse COW operation' button and add a tooltip 'This is
only supported in A/B OTA'.
Test: tested by non-A/B OTA package.
Change-Id: Ib6be1671f9106ee7e332cd2d0937c666a912a26e
Now the OTA analyzer could properly parse the installation operations
like move, bsdiff, imgdiff in non-A/B packages. It still cannot properly
parse the stash and free operations. Which means any operation involve
stash-id cannot be parsed properly.
Test: tested by a non-A/B incremental OTA package.
Change-Id: I08c5ab162e8ed62ea3313ec53b4fa4577a28799a
The non-A/B OTA package has a very different file system compared with
an OTA package. However, our OTA_analysis tool is based on the
update_metadata.proto. What we do here is try to convert the non-A/B OTA
package information, into a standard update_metadata.proto formated
manifest. The format and how the conversion works can be found in this
document:
https://docs.google.com/document/d/e/2PACX-1vRwMRodq4TCvTPEmlU6KL9vPSeFmEJjVXzq4PHhrB8tGy6oHFDJGCk3bIDA5Uv-4UEP0stLarBlhl2c/pub
In this CL, most of the information is successfully parsed, except
installation ops like stash, free, bsdiff, imgdiff, move. (anything
related to stash is not yet implemented)
Test: test by selecting a non-A/B OTA package.
Change-Id: I298f238395478422daece47cedbaa52a976d9f4c
A 700MiB OTA package now takes only 100ms to read in, compared with
7000ms previously. That's 70x faster.
When parsing the update_metadata in payload.bin, the entire file has to
be read in previously, because zip.js does not support partial read-in.
In fact, only a small portion of the payload.bin is update_metadata.
Reading the entire payload.bin not only slows down the process but also
occupy excessive memory.
The new class OTAPayloadBlobWriter (inherited from zip.Writer) will read
in the metadata (header, manifest, signature) and throw an StopIteration
exception when finished.
Test: open a large OTA package
Change-Id: Iebf8045325dae9a118d9d8ea5674872aa7c280c4
In a single page application, the url sometimes does not correspond to
the actual resources on the server. Thus, it might cause 404 when users
refresh the page. By redirecting this kind of url back to the homepage,
the proper page can be rendered. If the url does not exist, the front
end will redirect to a Not Found page.
Test: mannual tested.
Change-Id: I36beff436a450ae7fcabe9172df9c7cc217d7305
Previously, when multiple extra flags are set, the subprocess.run
can start generation properly. Now this is fixed.
Test: mannual tested.
Change-Id: Iab7275b9058a088d1fafd8c445c7f0775626c1ba
The metadata file in ota package contains prebuild and postbuild info,
now the basic info section will display those.
Test: mannual tested.
Change-Id: I264fe656ff6fab42d5161100c04210ab9a94c7a0
The lookbehind/lookahead regular expression is not supported in safari
yet. (https://caniuse.com/js-regexp-lookbehind) Removed it for
compatibility reason.
Test: manual tested.
Change-Id: I5801bcc389b20df31175adbb8a841eb1d31703aa