* changes:
cargo2android: Don't emit image support for tests
cargo2android: Support exported C headers
cargo2android: Emit apex_available + min_sdk_version for native libs
cargo2android: Add support for various image types
Image support doesn't make sense for test modules.
Bug: 178565008
Test: Generate rustc-demangle-capi
Change-Id: Ie5a1d85f9828e0c105c3a3e994b22ef7664fe1db
staticlib and cdylib crate types generally want to export header files
for use by C code. Allow the location of these headers to be provided to
c2a for inclusion in blueprint.
Bug: 178565008
Test: Generate rustc-demangle-capi
Change-Id: I0aa9acfb081ea39a7e13315bfc8029d06b8f55d3
We no longer use the --dependencies argument, but it is still used in
a number of places. Let's remove its functionality but keep the
command-line option as a no-op so we can remove the uses over time.
Test: Run on crate that uses the option.
Change-Id: I954f68faf11d1a926f0ccf070afa8332385e3671
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
Only run cargo metadata on the main crate, not all of its dependencies.
Pass it the --format-version argument to avoid a warning and be
future-proof.
Test: Run.
Change-Id: Icdf88bc3b633d18266772ae813fc04b529b95765
Older versions of Python's subprocess do not have capture_output, so
just get stdout directly.
Also pass the full path to cargo in case it is not on PATH.
Test: Run
Change-Id: I368e905a93b344bca6635c6ab7a60def809e88d5
If there are multiple packages present in the workspace, attempt
to determine what the current package is by checking the emitted
crate_name value against the package name. If this still fails, a new
`--no-pkg-vers` flag is added to skip this behavior.
Bug: 196803495
Test: New logic finds package if package.name is used for crate_name
Test: New flag prevents emitting the pkg version.
Change-Id: I152e94a0520f09f37622a6cec340ae35842d56ea
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
This parses a module's Cargo.toml file for package version number,
setting it to cargo_pkg_version. Also sets cargo_env_compat true by
default.
Bug: 171011485
Test: generated Android.bp includes cargo_env_compat, cargo_pkg_version.
Change-Id: Ibb8021633719650e2021b90806374a5d3c6a161a
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